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

App crashed when testing wifi hotspot: AttributeError: 'list' object has no attribute 'id' #212

Closed
mehrdadfeller opened this issue Jan 14, 2025 · 0 comments
Assignees

Comments

@mehrdadfeller
Copy link
Collaborator

I got this error when testing https://github.com/ubopod/ubo_app/actions/runs/12762841043 and the app crashed after pressing back in the image below:

ubo gui
1733059856.636606 [INFO] web-ui - stop
1736885953.303682 [INFO] web-ui - initialize - extra: {
  "description": "InputDescription(title='Untitled input', prompt='Enter WiFi connection', extra_information=None, id='17bbcab34c074e14951c20115f329034', pattern='^WIFI:S:(?P<SSID>[^;]*);(?:T:(?P<Type>(?i:WEP|WPA|WPA2|nopass));)?(?:P:(?P<Password>[^;]*);)?(?:H:(?P<Hidden>(?i:true|false));)?;$|^WIFI:T:(?P<Type_>(?i:WEP|WPA|WPA2|nopass));S:(?P<SSID_>[^;]*);(?:P:(?P<Password_>[^;]*);)?(?:H:(?P<Hidden_>(?i:true|false|));)?;$', fields=[InputFieldDescription(name='SSID', label='SSID', type=<InputFieldType.TEXT: 'text'>, description='The name of the WiFi network', title=None, pattern=None, default=None, options=None, required=True), InputFieldDescription(name='Password', label='Password', type=<InputFieldType.PASSWORD: 'password'>, description='The password of the WiFi network', title=None, pattern=None, default=None, options=None, required=False), InputFieldDescription(name='Type', label='Type', type=<InputFieldType.SELECT: 'select'>, description='The type of the WiFi network', title=None, pattern=None, default='WPA2', options=['WEP', 'WPA', 'WPA2', 'nopass'], required=False), InputFieldDescription(name='Hidden', label='Hidden', type=<InputFieldType.CHECKBOX: 'checkbox'>, description='Is the WiFi network hidden?', title=None, pattern=None, default='false', options=None, required=False)])",
  "is_connected": "False"
}
1736886035.066691 [ERROR] An error occurred while running the app.
Traceback (most recent call last):
  File "/opt/ubo/env/lib/python3.11/site-packages/ubo_app/main.py", line 84, in main
    app.run()
  File "/opt/ubo/env/lib/python3.11/site-packages/kivy/app.py", line 956, in run
    runTouchApp()
  File "/opt/ubo/env/lib/python3.11/site-packages/kivy/base.py", line 574, in runTouchApp
    EventLoop.mainloop()
  File "/opt/ubo/env/lib/python3.11/site-packages/kivy/base.py", line 339, in mainloop
    self.idle()
  File "/opt/ubo/env/lib/python3.11/site-packages/kivy/base.py", line 379, in idle
    Clock.tick()
  File "/opt/ubo/env/lib/python3.11/site-packages/kivy/clock.py", line 733, in tick
    self.post_idle(ts, self.idle())
  File "/opt/ubo/env/lib/python3.11/site-packages/kivy/clock.py", line 776, in post_idle
    self._process_events()
  File "kivy/_clock.pyx", line 620, in kivy._clock.CyClockBase._process_events
  File "kivy/_clock.pyx", line 653, in kivy._clock.CyClockBase._process_events
  File "kivy/_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events
  File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
  File "/opt/ubo/env/lib/python3.11/site-packages/ubo_app/store/main.py", line 141, in <lambda>
    trigger = Clock.create_trigger(lambda _: callback(), 0, interval=interval)
                                             ^^^^^^^^^^
  File "/opt/ubo/env/lib/python3.11/site-packages/redux/main.py", line 159, in run
    self._run_actions()
  File "/opt/ubo/env/lib/python3.11/site-packages/redux/main.py", line 135, in _run_actions
    result = self.reducer(self._state, action)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ubo/env/lib/python3.11/site-packages/redux/combine_reducers.py", line 119, in combined_reducer
    reducers_results = {
                       ^
  File "/opt/ubo/env/lib/python3.11/site-packages/redux/combine_reducers.py", line 120, in <dictcomp>
    key: reducer(
         ^^^^^^^^
  File "/opt/ubo/env/lib/python3.11/site-packages/ubo_app/services/090-web-ui/reducer.py", line 60, in reducer
    new_active_inputs := [
                         ^
  File "/opt/ubo/env/lib/python3.11/site-packages/ubo_app/services/090-web-ui/reducer.py", line 63, in <listcomp>
    if description.id != action.id
       ^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'id'
@sassanh sassanh self-assigned this Jan 26, 2025
@sassanh sassanh added this to Ubo App Jan 26, 2025
@sassanh sassanh moved this to Review / QA in Ubo App Jan 26, 2025
sassanh added a commit that referenced this issue Jan 26, 2025
…stead of a list due to an unwanted comma - closes #212
sassanh added a commit that referenced this issue Jan 29, 2025
…uts instead of a list due to an unwanted comma - closes #212
sassanh added a commit that referenced this issue Jan 31, 2025
…uts instead of a list due to an unwanted comma - closes #212
@github-project-automation github-project-automation bot moved this from Review / QA to Done in Ubo App Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants