amit9838 / mousam

Wather at a glance
https://amit9838.github.io/mousam/
GNU General Public License v3.0
193 stars 32 forks source link

No Data Shown #45

Closed dev-nicolaos closed 8 months ago

dev-nicolaos commented 8 months ago

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

Steps to Reproduce

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 commented 8 months ago

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

GWA60060 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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

dev-nicolaos commented 8 months ago

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 commented 8 months ago

49

amit9838 commented 8 months ago

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 commented 8 months ago

Issue appears to be resolved in v1.0.1

joekm commented 8 months ago

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 commented 8 months ago

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.