Closed jl94x4 closed 8 months ago
Can you show me how you're running the file? This seems like an issue with your python environment or how you're running the script, but maybe I'm missing something @jl94x4
py main.py
Are you running from current-version or the parent dir?
Current-version folder
Can you run "py --version" for me?
py --version Pythonpy ??? Python 3.10.12
Can you try "python3 main.py"?
python3 main.py Initiating Plex connection... Plex connection succeeded Initiating Spotify Connection Spotify connection succeeded Getting synced Lidarr playlists... Playlists grabbed ['37i9dQZF1E35ZCpaXlJL9l', '37i9dQZF1E369snZ4vCAsJ', '37i9dQZF1E37SnRieJ96Ov', '37i9dQZF1E37bCR6dnzXhj', '37i9dQZF1E38tViStP0eOU', '37i9dQZEVXbpgcowmWGpgY', '37i9dQZF1DX4W3aJJYCDfV', '3QzfkDvClpv27CKf7yLqfw', '2UEOUte7eCBdNYOOI7xizf', '37i9dQZF1E37SnRieJ96Ov', '7aCiVQAMMj91eXMac3u6BT'] Traceback (most recent call last): File "/home/ubuntu/spotify-to-plex/current-version/main.py", line 111, in <module> main() File "/home/ubuntu/spotify-to-plex/current-version/main.py", line 99, in main userlist = config("USERS").split(",") if config("USERS") else [] File "/home/ubuntu/.local/lib/python3.10/site-packages/decouple.py", line 248, in __call__ return self.config(*args, **kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/decouple.py", line 107, in __call__ return self.get(*args, **kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/decouple.py", line 92, in get raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option)) decouple.UndefinedValueError: USERS not found. Declare it as envvar or define a default value.
Can you show me your env?
Regardless of what you've got in there, my recommendation is to grab the latest version of the repo, and then recreate your .env based on the latest "default.env". I've made some changes that might be causing your issue, namely having USERS defined, even if empty, is required in the env. I may have pushed a commit that changed that requirement without updating the default.env. Also, if you use docker, I just pushed an update with a dockerfile, and there is a docker image on dockerhub that should resolve most people's compatibility issues.
Closing, can't reproduce, provided workaround/solution
When running the app I get the following;;
Traceback (most recent call last): File "/usr/bin/py", line 167, in <module> result = eval(args.expression) File "<string>", line 1, in <module> main.py NameError: name 'main' is not defined
I've filled out the .env file, but not sure what next as I get the above error when running.