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

TypeError when trying to login #6

Open
Latand opened this issue Sep 12, 2018 · 4 comments
Open

TypeError when trying to login #6

Latand opened this issue Sep 12, 2018 · 4 comments

Comments

@Latand
Copy link

Latand commented Sep 12, 2018

Hey, I'm trying to login, but TypeError is raised.

TypeError: a bytes-like object is required, not 'str'

>>> logged_in = pinterest.login()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\User\Documents\GitHub\pinterest-client\pinterest\Pinterest.py", line 110, in login
    self.user = self.extract_user_data(r.content)
  File "C:\Users\User\Documents\GitHub\pinterest-client\pinterest\Pinterest.py", line 93, in extract_user_data
    s = html_page[html_page.rfind('application/json'):]
TypeError: a bytes-like object is required, not 'str'
@bryanmorganoverbey
Copy link

works for me...

@bryanmorganoverbey
Copy link

from pinterest import Pinterest
pinterest = Pinterest(username_or_email='username', password='pass')

^^make sure you have these lines first

@qwhex
Copy link

qwhex commented Jan 13, 2019

You should run it with Python2

@Latand
Copy link
Author

Latand commented Jan 13, 2019

Too bad.

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

3 participants