toutatis
toutatis copied to clipboard
KeyError exception on launch
Hey :wave:
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.
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:
- 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
- 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
- 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.
any fix as of nnow?...all doesnt seem to work