santosderek / Imgur-To-Folder

Download Imgur albums and images to desired folder
Other
80 stars 9 forks source link

can't authenticate itf #25

Open AlanTuring42 opened 9 months ago

AlanTuring42 commented 9 months ago

Got this error after providing client_id client_secret path

Traceback (most recent call last):
  File "/usr/local/bin/itf", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/imgurtofolder/__main__.py", line 142, in main
    config = fetch_configuration(args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/imgurtofolder/__main__.py", line 218, in fetch_configuration
    config = Configuration(
             ^^^^^^^^^^^^^^
TypeError: Configuration.__init__() missing 2 required positional arguments: 'access_token' and 'refresh_token'

I tried it on macOS (with python 3.11.7 and pip 23.3.2) Besides also tried it on Colab (with python 3.10.12 and pip 23.1.2) and got the exact same error

vicky-cruz-8 commented 4 months ago

main.txt try to substitute this file with original main.py in the location given in your error. and remember to save it as .py also you can remove anything that is commented within the file.

flipjj commented 1 month ago

Also having trouble, already using the new main.py

Please enter client_id: *** Please enter client_secret: **** Open this URL in a browser: https://api.imgur.com/oauth2/authorize?client_id=d8bedef7121c28e&response_type=code&state=random_state_string&redirect_uri=http%3A%2F%2Flocalhost Paste the full redirect URL here: https://imgur.com/?state=random_state_string&code=778b10aab21ede31ea81a74f6a1df1857ff15104 [2024-10-03 13:18:56,055] [main] [INFO] Exception has occured Traceback (most recent call last): File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\imgurtofolder__main__.py", line 306, in main() File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\imgurtofolder__main.py", line 187, in main config = fetch_configuration(args) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\imgurtofolder\main__.py", line 275, in fetch_configuration _config_dict['access_token'] = tokens['access_token'] KeyError: 'access_token'