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

Selecting National Geographic's photo of the day as an image source creates system log errors #734

Open
padames opened this issue Dec 13, 2024 · 0 comments

Comments

@padames
Copy link

padames commented Dec 13, 2024

Version of Variety

Variety 0.8.12

Describe the bug

The selection of the image source to National Geographic's photo of the day results in error entries in the system log. The errors appear during the parsing of the HTTP response and result in the wallpaper image not downloaded.

Context

This failure happens silently from the functional side of the app, that's, it does not impede its normal operation otherwise and there are not error messages on the desktop. The error can only be detected while observing the system logs.

To Reproduce

  1. Select the National Geographic's picture of the day in the "General" tab of the Preferences window
  2. Tail the system log from a terminal window: tail -F \var\log\syslog
  3. Observer the error described below in the sample log file output

Attach Variety's log file

From the varlog file:

2024-12-13T11:57:27.655292-07:00 XPS13 variety.desktop[21590]: ERROR: 2024-12-13 11:57:27,654: download_one_from() 'Could not download wallpaper:'
2024-12-13T11:57:27.655365-07:00 XPS13 variety.desktop[21590]: Traceback (most recent call last):
2024-12-13T11:57:27.655397-07:00 XPS13 variety.desktop[21590]: File "/usr/lib/python3/dist-packages/requests/models.py", line 971, in json
2024-12-13T11:57:27.655419-07:00 XPS13 variety.desktop[21590]: return complexjson.loads(self.text, **kwargs)
2024-12-13T11:57:27.655434-07:00 XPS13 variety.desktop[21590]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-13T11:57:27.655448-07:00 XPS13 variety.desktop[21590]: File "/usr/lib/python3.12/json/init.py", line 346, in loads
2024-12-13T11:57:27.655472-07:00 XPS13 variety.desktop[21590]: return _default_decoder.decode(s)
2024-12-13T11:57:27.655496-07:00 XPS13 variety.desktop[21590]: ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-13T11:57:27.655521-07:00 XPS13 variety.desktop[21590]: File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
2024-12-13T11:57:27.655553-07:00 XPS13 variety.desktop[21590]: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2024-12-13T11:57:27.655581-07:00 XPS13 variety.desktop[21590]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-13T11:57:27.655605-07:00 XPS13 variety.desktop[21590]: File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
2024-12-13T11:57:27.655628-07:00 XPS13 variety.desktop[21590]: raise JSONDecodeError("Expecting value", s, err.value) from None
2024-12-13T11:57:27.655651-07:00 XPS13 variety.desktop[21590]: json.decoder.JSONDecodeError: Expecting value: line 2 column 9 (char 9)
2024-12-13T11:57:27.655676-07:00 XPS13 variety.desktop[21590]: During handling of the above exception, another exception occurred:
2024-12-13T11:57:27.655697-07:00 XPS13 variety.desktop[21590]: Traceback (most recent call last):
2024-12-13T11:57:27.655719-07:00 XPS13 variety.desktop[21590]: File "/usr/lib/python3/dist-packages/variety/VarietyWindow.py", line 1161, in download_one_from
2024-12-13T11:57:27.655743-07:00 XPS13 variety.desktop[21590]: file = downloader.download_one()
2024-12-13T11:57:27.655765-07:00 XPS13 variety.desktop[21590]: ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-13T11:57:27.655786-07:00 XPS13 variety.desktop[21590]: File "/usr/lib/python3/dist-packages/variety/plugins/downloaders/DefaultDownloader.py", line 141, in download_one
2024-12-13T11:57:27.655810-07:00 XPS13 variety.desktop[21590]: items = self.fill_queue()
2024-12-13T11:57:27.655834-07:00 XPS13 variety.desktop[21590]: ^^^^^^^^^^^^^^^^^
2024-12-13T11:57:27.655856-07:00 XPS13 variety.desktop[21590]: File "/usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/NationalGeographicDownloader.py", line 54, in fill_queue
2024-12-13T11:57:27.655887-07:00 XPS13 variety.desktop[21590]: queue = Util.fetch_json(DATA_URL)
2024-12-13T11:57:27.655909-07:00 XPS13 variety.desktop[21590]: ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-13T11:57:27.655930-07:00 XPS13 variety.desktop[21590]: File "/usr/lib/python3/dist-packages/variety/Util.py", line 684, in fetch_json
2024-12-13T11:57:27.655954-07:00 XPS13 variety.desktop[21590]: return Util.request(url, data, **request_kwargs).json()
2024-12-13T11:57:27.655978-07:00 XPS13 variety.desktop[21590]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-13T11:57:27.656003-07:00 XPS13 variety.desktop[21590]: File "/usr/lib/python3/dist-packages/requests/models.py", line 975, in json
2024-12-13T11:57:27.656024-07:00 XPS13 variety.desktop[21590]: raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
2024-12-13T11:57:27.656046-07:00 XPS13 variety.desktop[21590]: requests.exceptions.JSONDecodeError: Expecting value: line 2 column 9 (char 9)

Desktop environment and version

Output from: ubuntu-desktop 1.539.1 amd64 Ubuntu desktop system

ii ubuntu-desktop 1.539.1 amd64 Ubuntu desktop system

OS name and version

Ubuntu 24.04.1

Screenshots

Attached files

Additional context

This is not a show-stopper to display wallpaper images from other sources. However it does create noise in the system log file.

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

1 participant