question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python3 qtpy uses deprecated __version__ attribute from PySide

See original GitHub issue

I am running openSUSE Tumbleweed and I have the following problem:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/qtpy/__init__.py", line 119, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
ImportError: cannot import name '__version__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/spyder3", line 3, in <module>
    start.main()
  File "/usr/lib/python3.6/site-packages/spyder/app/start.py", line 103, in main
    from spyder.app import mainwindow
  File "/usr/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 49, in <module>
    requirements.check_qt()
  File "/usr/lib/python3.6/site-packages/spyder/requirements.py", line 39, in check_qt
    import qtpy
  File "/usr/lib/python3.6/site-packages/qtpy/__init__.py", line 125, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found

It seems qtpy tries to import __version__, which was only available in the Python2 version of PySide. I had a quick dir(PySide) look at the available attributes and there isn’t one that handles a version string.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sebixcommented, Jul 21, 2017

Ok, then I assumed it’s fixed (“works for me”).

1reaction
ccordoba12commented, May 15, 2017

I filed a bug report in the SUSE bug tracker so hopefully the maintainer will resolve this.

Closing for now then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deprecation warning in Python, does it make sense here?
I am a newbie to Python, but I think this warning doesn't make sense, because setFlags argument, as well as flags() return value...
Read more >
Qt for Python - Qt Documentation
This attribute has been deprecated. Use windowModality instead. Qt.WA_Hover. Forces Qt to generate paint events when the mouse enters or leaves the widget....
Read more >
PySide2 vs PySide6: What are the differences, and is it time to ...
Qt5 and aren't unique to PySide itself. If you're still using Python 2.x, note that PySide6 is available only for Python 3.x versions....
Read more >
PySide - PyPI
PySide is the Python Qt bindings project, providing access the complete Qt 4.8 framework ... Use setuptools to install the egg binary packages...
Read more >
Deprecations and removals - Pillow (PIL Fork) 9.3.0 ...
PyQt4 and PySide#. Deprecated since version 6.0.0. Removed in version 7.0.0. Qt 4 reached end ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found