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

No Data Shown #45

Closed
dev-nicolaos opened this issue Jan 15, 2024 · 12 comments
Closed

No Data Shown #45

dev-nicolaos opened this issue Jan 15, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@dev-nicolaos
Copy link

dev-nicolaos commented Jan 15, 2024

OS: Fedora 39
DE: Gnome
Package Format: Flatpak
Application Version: 1.0

Steps to Reproduce

  • Open Flatseal
  • Select Weather
  • Observe that Weather has network access
  • Open Weather
  • Observe no data is shown, just an error message saying "Could not fetch data from API"

Before updating to 1.0 I was able to use the app just fine. I've tried restarting my computer but it had no effect. Other software on my computer is able to access the internet without issue. I am able to search for and add new locations in the locations dialogue.

@amit9838
Copy link
Owner

amit9838 commented Jan 15, 2024

can you test with this build?
io.github.amit9838.weather.zip
command to install flatpak
flatpak install <flatpak file name>

@GWA60060
Copy link

Same issue on Ubuntu 20.04.3 and Gnome
Network access confirmed via Firefox
Weather returns " could not fetch data from API'
restart has no benefit
previous version was OK

@dev-nicolaos
Copy link
Author

I downloaded the build linked in this comment.

Here's the install log

flatpak install io.github.amit9838.weather.flatpak
Required runtime for io.github.amit9838.weather/aarch64/master (runtime/org.gnome.Platform/aarch64/45) found in remote flathub
Do you want to install it? [Y/n]: y
        ID                                             Arch              Branch                Op           Remote                   Download
 1. [✓] org.freedesktop.Platform.GL.default            aarch64           23.08                 i            flathub                  128.1 MB / 144.5 MB
 2. [✓] org.freedesktop.Platform.GL.default            aarch64           23.08-extra           i            flathub                   13.0 MB / 144.5 MB
 3. [✓] org.freedesktop.Platform.openh264              aarch64           2.2.0                 i            flathub                  823.8 kB / 884.8 kB
 4. [✓] org.gnome.Platform.Locale                      aarch64           45                    i            flathub                   18.2 kB / 369.2 MB
 5. [✓] org.gnome.Platform                             aarch64           45                    i            flathub                  268.0 MB / 363.7 MB
 6. [✓] io.github.amit9838.weather                     aarch64           master                i            weather-origin           0 bytes

Installation complete.

This build seems to rely on a different platform (aarch64) than all my other flatpaks (including the version of weather I download from the store) which run on x86_64.

I uninstalled the store version to avoid confusion.

No icon appeared in my app menu after installation, so I tried to run the app from the command line. Here's the output log

nicolaos@fedora:~$ flatpak run io.github.amit9838.weather
Exception in thread cwt:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/app/share/weather/weather/weatherData.py", line 23, in fetch_current_weather
    current_weather_data = obj._get_current_weather(*get_cords())
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Weather._get_current_weather() missing 1 required positional argument: 'lon'
Exception in thread dft:
Traceback (most recent call last):
Exception in thread apt:
  File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
Exception in thread hft:
    self.run()
Traceback (most recent call last):
    self.run()
  File "/usr/lib/python3.11/threading.py", line 982, in run
  File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
  File "/usr/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    self.run()
  File "/app/share/weather/weather/weatherData.py", line 91, in fetch_current_air_pollution
  File "/usr/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/app/share/weather/weather/weatherData.py", line 80, in fetch_daily_forecast
    air_apllution_data = obj._get_current_air_pollution(*get_cords())
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: AirPollution._get_current_air_pollution() missing 1 required positional argument: 'lon'
    self._target(*self._args, **self._kwargs)
    daily_forecast_data = obj._get_daily_forecast(*get_cords())
  File "/app/share/weather/weather/weatherData.py", line 46, in fetch_hourly_forecast
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Weather._get_daily_forecast() missing 1 required positional argument: 'lon'
    hourly_forecast_data = obj._get_hourly_forecast(*get_cords())
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Weather._get_hourly_forecast() missing 1 required positional argument: 'lon'
Exception in thread load_data:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/app/share/weather/weather/weather.py", line 201, in _load_weather_data
    self.get_weather()
  File "/app/share/weather/weather/weather.py", line 229, in get_weather
    current_container_clamp.set_child(CurrentCondition())
                                      ^^^^^^^^^^^^^^^^^^
  File "/app/share/weather/weather/frontendCurrentCond.py", line 15, in __init__
    self.paint_ui()
  File "/app/share/weather/weather/frontendCurrentCond.py", line 33, in paint_ui
    weather_code = data.weathercode.get("data")
                   ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'weathercode'
amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-25)
amdgpu: amdgpu_device_initialize failed.
libEGL warning: egl: failed to create dri2 screen
amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-25)
radv/amdgpu: failed to initialize device.
MESA: error: ZINK: vkEnumeratePhysicalDevices failed (VK_ERROR_INITIALIZATION_FAILED)
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen

After printing this to the terminal a window opened, but got stuck at a large loading spinner that never resolved.

After closing the app, an icon for weather did show up in my app menu, but clicking it does not launch the app.

@amit9838
Copy link
Owner

amit9838 commented Jan 15, 2024

ok, just for security reasons can you mail me(don't write here) the city/loc or cords you are trying to access, so that i can reproduce the same thing 🙂

@dev-nicolaos
Copy link
Author

Not overly worried about folks knowing what area I'm in as both my website and GH profile both show where I'm from, so I'll just post here.

In v1.0 I was trying various locations in southwest Washington state (Vancouver, Battleground, Ridgefield) in the US. In the build you linked I never went into the locations menu, so it'd be whatever the default is.

@amit9838
Copy link
Owner

amit9838 commented Jan 15, 2024

I've fixed the issue and tried with the locations you provided.
Hopefully it should work.
would be nice if you remove previously added locations.
io.github.amit9838.weather.zip

@amit9838 amit9838 added the bug Something isn't working label Jan 15, 2024
@dev-nicolaos
Copy link
Author

After uninstalling all old builds and their associated app data I installed the build linked in this comment. After installation an icon did appear in my app menu. Opening the app showed the weather correctly. I was also able to search for my location and load the data for it. Switching to imperial units also worked as expected.

The only bad thing was the entire app performed terribly. Menu items were very slow to respond to inputs and animations (such as the loading spinner) were extremely choppy. I'm on a fairly powerful laptop, so its not the hardware. I'm not sure if this is a result of some code change in this build or if its because there's a lot of overhead running an aarch64 flatpak on an x86_64 machine.

@amit9838
Copy link
Owner

#49

@amit9838
Copy link
Owner

After uninstalling all old builds and their associated app data I installed the build linked in this comment. After installation an icon did appear in my app menu. Opening the app showed the weather correctly. I was also able to search for my location and load the data for it. Switching to imperial units also worked as expected.

The only bad thing was the entire app performed terribly. Menu items were very slow to respond to inputs and animations (such as the loading spinner) were extremely choppy. I'm on a fairly powerful laptop, so its not the hardware. I'm not sure if this is a result of some code change in this build or if its because there's a lot of overhead running an aarch64 flatpak on an x86_64 machine.

Production vesion from the store should work fine

@dev-nicolaos
Copy link
Author

Issue appears to be resolved in v1.0.1

@joekm
Copy link

joekm commented Jan 16, 2024

I can confirm it works as a flatpak, but it grinds endlessly on "getting weather data" when installing via AUR (where it builds from source). The latter would be preferable since it will inherit the Gnome theme I'm using rather than the default in the flatpak "sandbox".

@amit9838
Copy link
Owner

Ya, that could be the case, because this package has been configured to work as flatpak and snap. If someone is intrested in binding the package as AUR, deb, rpm or any other packeage, i'm okey with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants