bauh crashes with empty appimage url
See original GitHub issueBefore opening a new issue Install the staging branch and check if the unexpected behavior is happening there as well. If you are on ArchLinux-based distro, you can install it through AUR (bauh-staging). Otherwise, you have to clone the repository and install it with pip:
git clone https://github.com/vinifmor/bauh.git -b staging --depth=1
cd bauh
python3 -m venv venv
venv/bin/pip install pip --upgrade
venv/bin/pip install setuptools --upgrade
venv/bin/pip install -r requirements.txt
venv/bin/pip install .
venv/bin/bauh # or venv/bin/bauh-tray
Describe the bug App crashes when AppImage url is suddenly empty (no idea how that could happen).
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/bauh/view/qt/thread.py", line 435, in run
requirements = self.manager.get_upgrade_requirements(models, root_password, self)
File "/usr/lib/python3.9/site-packages/bauh/view/core/controller.py", line 576, in get_upgrade_requirements
man_reqs = man.get_upgrade_requirements(pkgs, root_password, watcher)
File "/usr/lib/python3.9/site-packages/bauh/gems/appimage/controller.py", line 791, in get_upgrade_requirements
installed_size = self.http_client.get_content_length_in_bytes(pkg.url_download)
File "/usr/lib/python3.9/site-packages/bauh/api/http.py", line 76, in get_content_length_in_bytes
res = self.session.get(**params)
File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 528, in request
prep = self.prepare_request(req)
File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 456, in prepare_request
p.prepare(
File "/usr/lib/python3.9/site-packages/requests/models.py", line 316, in prepare
self.prepare_url(url, params)
File "/usr/lib/python3.9/site-packages/requests/models.py", line 390, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?
Fatal Python error: Aborted
Current thread 0x00007f651d7fa640 (most recent call first):
<no Python frame>
Thread 0x00007f651effd640 (most recent call first):
File "/usr/lib/python3.9/site-packages/bauh/view/qt/thread.py", line 822 in run
Thread 0x00007f65437fe640 (most recent call first):
File "/usr/lib/python3.9/site-packages/bauh/view/qt/thread.py", line 822 in run
Thread 0x00007f651f7fe640 (most recent call first):
File "/usr/lib/python3.9/site-packages/bauh/view/qt/prepare.py", line 140 in run
Thread 0x00007f6549768640 (most recent call first):
File "/usr/lib/python3.9/site-packages/bauh/view/util/cache.py", line 96 in run
File "/usr/lib/python3.9/threading.py", line 973 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 930 in _bootstrap
Thread 0x00007f6561fdc740 (most recent call first):
File "/usr/lib/python3.9/site-packages/bauh/app.py", line 54 in main
File "/usr/bin/bauh", line 33 in <module>
[1] 56866 abort (core dumped) bauh
Software Environment bauh version: 0.9.21-staging O.S: 5.10.70-1-MANJARO Python version: v3.9.7 Installation method: pacman
P.S: these instructions and the template must be respected, otherwise your issue will be closed.
I’ve opened a PR with a workaround that solves the issue for me, although it is not clear to me how the underlying issue came to be in the first place. Maybe there is a better solution for this…
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Thanks for the feedback and quick fix! I will try that in a couple hours then and let you know.
Sorry for the delayed answer, I appreciate your thorough explanations and quick response! 😃
That’s great to know!
I was unable to reproduce any bugs with the current staging branch so I think the issue is well resolved.
Thank you again!