-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error #1
Comments
Use version 3.0
…On Thu, 19 Aug 2021, 13:44 V1lu0, ***@***.***> wrote:
windwos10,Python 3.9.6,use the example code
I used to use python3 in other versions,All the errors are herefrom
pytglib.client import Telegram
from pytglib.client import Telegram
# Change the values below
api_id = ******
api_hash = '******'
phone_number = '+******'
dbenc = '******'
# Initiate the client
client = Telegram(api_id=api_id, api_hash=api_hash, phone=phone_number, database_encryption_key=dbenc)
# Login to the client
client.login()
# Define the handler function
def my_message_handler(update):
print(update)
# Register it
client.add_message_handler(my_message_handler)
tg.idle()
# And you're ready to go!
C:\Users\******\python3>python 1.py
Traceback (most recent call last):
File "C:\Users\******\python3\1.py", line 1, in <module>
from pytglib.client import Telegram
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "D:\******\Python39\lib\site-packages\pytglib-0.4-py3.9.egg\pytglib\client.py", line 18, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "D:\******\Python39\lib\site-packages\pytglib-0.4-py3.9.egg\pytglib\functions.py", line 9, in <module>
File "D:\******\Python39\lib\site-packages\pytglib-0.4-py3.9.egg\pytglib\functions.py", line 214, in Function
TypeError: __init__() missing 1 required positional argument: 'horizontal_accuracy'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADC2LU4FLACMM2YGOM7ZVGLT5SK3JANCNFSM5CNOX6XA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
python3 ? |
My python version is 3 |
3.6++
…On Thu, Aug 19, 2021 at 3:01 PM V1lu0 ***@***.***> wrote:
python3 ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADC2LU6FFDQW3L5T4ORNURTT5ST3DANCNFSM5CNOX6XA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
didn't work in Python 3.6.8 |
same error on Python 3.8.10 (Linux - ubuntu 20 - nginx ) |
Fixed in latest commit, should work now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
windwos10,Python 3.9.6,use the example code
I used to use python3 in other versions,All the errors are here
from pytglib.client import Telegram
The text was updated successfully, but these errors were encountered: