megadose / toutatis

Toutatis is a tool that allows you to extract information from instagrams accounts such as e-mails, phone numbers and more
GNU General Public License v3.0
1.9k stars 237 forks source link

KeyError exception on launch #77

Closed carlsmedstad closed 2 months ago

carlsmedstad commented 1 year ago

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.

EliteGreyIT67 commented 9 months ago

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:

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:

katasandi1234 commented 6 months ago

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

megadose commented 2 months ago

https://github.com/megadose/toutatis/commit/22a59c0984fd17d5e01cdb57669ec527b2c6b3d5