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

0.4.2 build on ubuntu 22.04 can't import PySide2.QtSvg #500

Closed
deeplow opened this issue Aug 2, 2023 · 0 comments · Fixed by #503
Closed

0.4.2 build on ubuntu 22.04 can't import PySide2.QtSvg #500

deeplow opened this issue Aug 2, 2023 · 0 comments · Fixed by #503
Labels
bug Something isn't working
Milestone

Comments

@deeplow
Copy link
Contributor

deeplow commented Aug 2, 2023

0.4.2 made use of QtSvg for adding icons. However we missed one thing. On debian platforms we are likely lacking a dependency for this.

So we get the following error when running the installed Dangerzone version on ubuntu 22.04:

user@dangerzone:~/dangerzone$ ./dev_scripts/dangerzone
Traceback (most recent call last):
  File "/home/user/dangerzone/dangerzone/gui/main_window.py", line 19, in <module>
    from PySide6 import QtCore, QtGui, QtSvg, QtWidgets
  File "/usr/lib/python3/dist-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'PySide6'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/dangerzone/./dev_scripts/dangerzone", line 11, in <module>
    import dangerzone
  File "/home/user/dangerzone/dangerzone/__init__.py", line 16, in <module>
    from .gui import gui_main as main
  File "/home/user/dangerzone/dangerzone/gui/__init__.py", line 30, in <module>
    from .main_window import MainWindow
  File "/usr/lib/python3/dist-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/user/dangerzone/dangerzone/gui/main_window.py", line 21, in <module>
    from PySide2 import QtCore, QtGui, QtSvg, QtWidgets
ImportError: cannot import name 'QtSvg' from 'PySide2' (/usr/lib/python3/dist-packages/PySide2/__init__.py)
user@dangerzone:~/dangerzone$ dangerzone 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dangerzone/gui/main_window.py", line 19, in <module>
    from PySide6 import QtCore, QtGui, QtSvg, QtWidgets
  File "/usr/lib/python3/dist-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'PySide6'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/dangerzone", line 33, in <module>
    sys.exit(load_entry_point('dangerzone==0.4.1', 'console_scripts', 'dangerzone')())
  File "/usr/bin/dangerzone", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/dangerzone/__init__.py", line 16, in <module>
    from .gui import gui_main as main
  File "/usr/lib/python3/dist-packages/dangerzone/gui/__init__.py", line 30, in <module>
    from .main_window import MainWindow
  File "/usr/lib/python3/dist-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/dangerzone/gui/main_window.py", line 21, in <module>
    from PySide2 import QtCore, QtGui, QtSvg, QtWidgets
ImportError: cannot import name 'QtSvg' from 'PySide2' (/usr/lib/python3/dist-packages/PySide2/__init__.py)
@deeplow deeplow added this to the 0.4.2 milestone Aug 2, 2023
@deeplow deeplow added the bug Something isn't working label Aug 2, 2023
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

Successfully merging a pull request may close this issue.

1 participant