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

KeyError exception on launch #77

Closed
carlsmedstad opened this issue Jun 23, 2023 · 3 comments
Closed

KeyError exception on launch #77

carlsmedstad opened this issue Jun 23, 2023 · 3 comments

Comments

@carlsmedstad
Copy link

Hey 👋

I'm in the process of packaging this for Arch Linux and I'm running in to the following issue:

$ toutatis -u xxxxxxxxx -s xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Traceback (most recent call last):
  File "/bin/toutatis", line 33, in <module>
    sys.exit(load_entry_point('toutatis==1.26', 'console_scripts', 'toutatis')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/toutatis/core.py", line 85, in main
    if not infos["user"]:
           ~~~~~^^^^^^^^
KeyError: 'user'

Running on Python 3.11.

@EliteGreyIT67
Copy link

The error message KeyError: 'user' indicates that the Toutatis script is trying to access the user key in a dictionary, but the key does not exist. This can happen for a few reasons, such as:

  • The Toutatis script is using an outdated version of the Instagram API, and the API has changed since then.
  • The Instagram user you are trying to scrape is private, and Toutatis does not have permission to access their data.
  • You have made a mistake in your Toutatis command line options.

To fix this error, you can try the following:

  1. Make sure that you are using the latest version of the Toutatis script. You can update Toutatis by running the following command:
pip install toutatis --upgrade
  1. If you are trying to scrape a private Instagram user, you will need to log in to your own Instagram account first. You can do this by passing the -u and -s options to the Toutatis command line. For example, to scrape the Instagram user @johndoe, you would run the following command:
toutatis -u johndoe -s your_instagram_password
  1. Check your Toutatis command line options to make sure that they are correct. For example, if you are trying to scrape a specific Instagram post, you will need to pass the -p option to the Toutatis command line with the post ID.

If you are still getting the KeyError: 'user' error after trying the above steps, you may need to report the issue to the Toutatis developers.

In addition to the above, here are some other possible solutions:

  • Try restarting your computer.
  • Make sure that you have the required Python libraries installed.
  • Try running Toutatis from a different directory.
  • Try running Toutatis as a different user.

@katasandi1234
Copy link

any fix as of nnow?...all doesnt seem to work

@megadose
Copy link
Owner

22a59c0

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

4 participants