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

Couldn't find an account with the username... #114

Open
Piero24 opened this issue May 21, 2024 · 2 comments
Open

Couldn't find an account with the username... #114

Piero24 opened this issue May 21, 2024 · 2 comments

Comments

@Piero24
Copy link

Piero24 commented May 21, 2024

I'm trying to use Ensta to print the list of followers from the profile, but unfortunately, I'm getting the following problem.

from ensta import Mobile

mobile = Mobile("Username", "Password")

followers = mobile.followers("leomessi", 10)
followings = mobile.followings("leomessi", 10)

for user in followers.list:
    print(user.full_name)

for user in followings.list:
    print(user.full_name)

# Fetching next chunk
followers = mobile.followers(
    "Username",
    next_cursor=followers.next_cursor
)
Traceback (most recent call last):
  File "/Users/User/Documents/test.py", line 5, in <module>
    mobile = Mobile("Username", "Password")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/User/Documents/env/lib/python3.12/site-packages/ensta/Mobile.py", line 72, in __init__
    self.refresh_credentials(
  File "/Users/User/Documents/env/lib/python3.12/site-packages/ensta/Mobile.py", line 103, in refresh_credentials
    self.credentials = Credentials(
                       ^^^^^^^^^^^^
  File "/Users/User/Documents/env/lib/python3.12/site-packages/ensta/Credentials.py", line 73, in __init__
    self.login(identifier, password, save_folder)
  File "/Users/User/Documents/env/lib/python3.12/site-packages/ensta/Credentials.py", line 122, in login
    raise AuthenticationError(
ensta.lib.Exceptions.AuthenticationError: Login failed with given credentials.
Response: {'message': "We couldn't find an account with the username Username. Check the username you entered and try again.", 'status': 'fail', 'error_title': 'Username Not Found', 'buttons': [{'title': 'Try Again', 'action': 'dismiss'}, {'title': 'Recover Your Account', 'action': 'show_recovery_challenge'}], 'invalid_credentials': True, 'exception_name': 'UserInvalidCredentials'}

I've tried using Web instead of Mobile as mentioned here but it seems that there is no option to return the followers.

What can I do to resolve this?

@huttphil
Copy link

It's trying to log in as "Username" with password "Password"

Presumably you realize you have to replace these?

@Piero24
Copy link
Author

Piero24 commented Sep 29, 2024

Hi @huttphil, yes I have replaced them. I have used "Username", "Password" just for posting the error here.

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