Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flickr API key expired #702

Open
fpasqua75 opened this issue May 24, 2024 · 4 comments
Open

Flickr API key expired #702

fpasqua75 opened this issue May 24, 2024 · 4 comments

Comments

@fpasqua75
Copy link

Version of Variety
0.8.12

Describe the bug
Flickr API key is expired

Context
I find this error in the logs:

mag 24 09:40:10 easterlaptop.local variety.desktop[2983]:   File "/usr/lib/python3.12/site-packages/variety/FlickrDownloader.py", line 163, in fill_queue
mag 24 09:40:10 easterlaptop.local variety.desktop[2983]:     raise Exception("Flickr returned error message: " + resp["message"])
mag 24 09:40:10 easterlaptop.local variety.desktop[2983]: Exception: Flickr returned error message: Invalid API Key (Key has expired)
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]: ERROR: 2024-05-24 09:40:11,530: download_one_from() 'Could not download wallpaper:'
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]: Traceback (most recent call last):
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]:   File "/usr/lib/python3.12/site-packages/variety/VarietyWindow.py", line 1164, in download_one_from
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]:     file = downloader.download_one()
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]:            ^^^^^^^^^^^^^^^^^^^^^^^^^
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]:   File "/usr/lib/python3.12/site-packages/variety/plugins/downloaders/DefaultDownloader.py", line 141, in download_one
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]:     items = self.fill_queue()
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]:             ^^^^^^^^^^^^^^^^^
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]:   File "/usr/lib/python3.12/site-packages/variety/FlickrDownloader.py", line 163, in fill_queue
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]:     raise Exception("Flickr returned error message: " + resp["message"])
mag 24 09:40:11 easterlaptop.local variety.desktop[2983]: Exception: Flickr returned error message: Invalid API Key (Key has expired)

To Reproduce

  1. nothing in particular

Attach Variety's log file

Desktop environment and version
Gnome 48

OS name and version

$ cat /etc/issue && cat /etc/os-release
\S
Kernel \r on an \m (\l)

NAME="Fedora Linux"
VERSION="40 (Workstation Edition)"
ID=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora Linux 40 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:40"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f40/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=40
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=40
SUPPORT_END=2025-05-13
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Thank you.

@evjeesm
Copy link

evjeesm commented Jun 19, 2024

Same trouble on Debian Bookworm.
Variety version: 0.8.10-1

@henti
Copy link

henti commented Jun 20, 2024

being able to add your own Flickr key/secret would be very nice as a feature..

@mendhak
Copy link
Contributor

mendhak commented Sep 14, 2024

This is still broken unfortunately. On a fresh install from the PPA, on a fresh Ubuntu 24.04. When trying to add a Flickr source, or use the existing one, the error appears bottom right.

Invalid API Key (Key has expired)

image

@mendhak
Copy link
Contributor

mendhak commented Sep 14, 2024

Temporary workaround if anyone wants, but it isn't trivial, it'll get undone on each update. Hopefully this API key issue is resolved soon.

You need to know where your Variety installation's Python scripts are.
And generate your own Flickr API key.

Create a script, notice the second line pointing at the variety folder.

import sys
sys.path.append('/usr/lib/python3/dist-packages/variety/')
import FlickrDownloader
from Util import Util
print(Util.unxor(FlickrDownloader.HASH, sys.argv[1]))

Run it, passing your own API key.

python3 gethash.py xxxxxxxxxxxxxxxxxxxxxxxxxx

Then modify the /usr/lib/python3/dist-packages/variety/FlickrDownloader.py file and replace API_KEY with the output from above.

Restart Variety then try using the Flickr feature. I hope this is an acceptable workaround as a temporary measure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants