gilesknap / gphotos-sync

Google Photos and Albums backup with Google Photos Library API
Apache License 2.0
1.97k stars 163 forks source link

3.0.0 - Unexpected keyword argument 'allowed_methods' #350

Closed Nooblet-69 closed 2 years ago

Nooblet-69 commented 2 years ago

Hi,

I updated and tested and it has stopped working. I went through OAuth flow again to be sure it wasn't related to the OAuth changes.

I upgraded with the command pip install gphotos-sync --upgrade

And ran the new version with the command gphotos-sync 'C:\Users\Simeon\GooglePhotos' --archived --flush-index

And without the arguments gphotos-sync 'C:\Users\Simeon\GooglePhotos'

The error I am getting is " 05-16 06:27:09 ERROR Process failed. Traceback (most recent call last): File "c:\users\simeon\personal\codeprojects\googlephotosbackup\lib\site-packages\gphotos_sync\Main.py", line 480, in main self.setup(args, db_path) File "c:\users\simeon\personal\codeprojects\googlephotosbackup\lib\site-packages\gphotos_sync\Main.py", line 329, in setup self.auth.authorize() File "c:\users\simeon\personal\codeprojects\googlephotosbackup\lib\site-packages\gphotos_sync\authorize.py", line 108, in authorize retries = Retry( TypeError: init() got an unexpected keyword argument 'allowed_methods' "

Quick google of that error made me thing it was a version mismatch on one of the libraries. So I have listed the version I have installed in my virtual env below. Package Version


appdirs 1.4.3 attrs 19.3.0 cachetools 5.0.0 certifi 2020.4.5.1 chardet 3.0.4 enum34 1.1.10 exif 0.8.2 google-auth 2.6.6 google-auth-oauthlib 0.5.1 gphotos-sync 3.0.0 idna 2.9 oauthlib 3.1.0 pip 22.1 psutil 5.7.0 pyasn1 0.4.8 pyasn1-modules 0.2.8 pywin32 227 PyYAML 5.3.1 requests 2.23.0 requests-oauthlib 1.3.0 rsa 4.8 setuptools 41.2.0 six 1.16.0 types-PyYAML 6.0.7 types-requests 2.27.25 types-urllib3 1.26.14 urllib3 1.25.8

Sorry if I have missed anything basic I don't submit may issues on github.

Also I just wanted to thank the creator and contributors for making and maintaining this project. It makes my backup life much simpler and I don't know what I would do without it.

Simeon

gilesknap commented 2 years ago

@Nooblet-69 sorry I did not check the upgrade on windows, only the install on a new system. I think your instinct is correct - probably the best thing to do would be to use virtual envs on Windows like we do on linux to isolate dependencies.

You could try

pip uninstall gphotos-sync
pip install gphotos-sync==3.0.0

If that does not work then please try creating a venv and using that - if you don't know how, I'll do a walkthrough this evening and document it.

Nooblet-69 commented 2 years ago

Fresh virtual environment with fresh install got it working Might be an old version of python as I first set this up a couple years ago. So the virtual environment is that old

gilesknap commented 2 years ago

Great. Would you mind posting some brief instructions on creating venv on windows? Or even better do a PR on this file https://github.com/gilesknap/gphotos-sync/blob/main/docs/how-to/windows.rst#python ?

Thanks!

gilesknap commented 2 years ago

Version 3.0.3 is released with recommendation to use a venv on Windows as supplied by @Nooblet-69

Many thanks.