Skip to content
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 #4

Open
kevo818 opened this issue Mar 4, 2021 · 3 comments
Open

Error #4

kevo818 opened this issue Mar 4, 2021 · 3 comments

Comments

@kevo818
Copy link

kevo818 commented Mar 4, 2021

INFO:FMF:Authenticating FMF service
INFO:FMF:Login succesful
INFO:FMF:FMF service enabled on account
INFO:FMF:Authenticating FMF service
INFO:FMF:Login succesful
INFO:FMF:FMF service enabled on account
Traceback (most recent call last):
File "C:\Users\kevo\Desktop\work\track.py", line 8, in
ps = PySMS(address="[email protected]", password="PASSWORD", smtp_server="smtp.gmail.com", smtp_port="465", ssl=True)
File "C:\Users\kevo\Desktop\work\PySMS.py", line 51, in init
self.validate(address, password)
File "C:\Users\kevo\Desktop\work\PySMS.py", line 165, in validate
assert isinstance(address, basestring)
NameError: name 'basestring' is not defined

This is the error i get when trying to run the file

also got this earlier

C:\Users\kevo\Desktop\work>python track.py
INFO:FMF:Authenticating FMF service
INFO:FMF:Login succesful
INFO:FMF:FMF service enabled on account
INFO:FMF:Authenticating FMF service
INFO:FMF:Login succesful
INFO:FMF:FMF service enabled on account
Traceback (most recent call last):
File "C:\Users\kevo\Desktop\work\track.py", line 8, in
ps = PySMS(email="[email protected]", password="PASSWORD", smtp_server="smtp.gmail.com", smtp_port="465", ssl=True)
TypeError: init() got an unexpected keyword argument 'email'

however i changed email to address and it worked. still need help with the first error tho

@clayshieh
Copy link
Owner

Hi @kevo818, please change your password for [email protected] IMMEDIATELY as well as any other accounts that use that password if that was truly the password for your gmail account (I sincerely hope not) and de-auth any active sessions for that gmail account as you effectively just posted your password for that account. In the future, when copying pasting code to public resources please make sure that you scrub any credentials and personally identifiable information in general.

In regards to the issue, this code was written a while back with python 2.7 and from your error it seems like you're using python 3 which dropped support for basestring. I have not worked on this code in a while but you can change lines #165 and 166 in PySMS.py to the following to fix the immediate error link:

assert isinstance(address, str)
assert isinstance(password, str)

Alternatively, you can switch to using python 2.7 instead to fix the issue.

@kevo818
Copy link
Author

kevo818 commented Mar 5, 2021

haha, thats my gmail for all my smtp projects, i dont really care about it to much. Thanks for the lookout tho! also, i got a new error.

File "C:\Users\kevo\Desktop\work\track.py", line 8, in
ps = PySMS(address="....", password="....", smtp_server="smtp.gmail.com", smtp_port="465", ssl=True)
File "C:\Users\kevo\Desktop\work\PySMS.py", line 93, in init
self.init_server()
File "C:\Users\kevo\Desktop\work\PySMS.py", line 196, in init_server
self.smtp.login(self.address, self.password)
File "C:\Users\kevo\AppData\Local\Programs\Python\Python39\lib\smtplib.py", line 723, in login
(code, resp) = self.auth(
File "C:\Users\kevo\AppData\Local\Programs\Python\Python39\lib\smtplib.py", line 634, in auth
response = encode_base64(initial_response.encode('ascii'), eol='')
AttributeError: 'bytes' object has no attribute 'encode'

new error boss

@kevo818
Copy link
Author

kevo818 commented Mar 5, 2021

anyway you could show me how to integrate your FMF api with twlio? I have a free trial id like to use it for something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants