Bug 255766 - security/yubioath-desktop: Fails to run with Python 3.8: PyOtherSide error: ImportError: PyCapsule_Import could not import module 'datetime'
Summary: security/yubioath-desktop: Fails to run with Python 3.8: PyOtherSide error: I...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2021-05-11 00:55 UTC by Tim Preston
Modified: 2022-11-29 23:01 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (daniel)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Preston 2021-05-11 00:55:28 UTC
Using Yubico Authenticator 5.0.4 with Latest pkg repo has pulled in python 3.8 dependencies. The Authenticator no longer works, reporting the following:

---

Got library name:  "/usr/local/lib/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
"PyOtherSide error: ImportError: PyCapsule_Import could not import module \"datetime\"\n\n\nThe above exception was the direct cause of the following exception:\n\n\nTraceback (most recent call last):\n\n  File \"/usr/local/lib/python3.8/site.py\", line 194, in addsitedir\n    known_paths = _init_pathinfo()\n\n  File \"/usr/local/lib/python3.8/site.py\", line 137, in _init_pathinfo\n    d = set()\n\nSystemError: <class 'set'> returned a result with an error set\n"
Unhandled PyOtherSide error: Return value of PyObject call is NULL: ImportError: PyCapsule_Import could not import module "datetime"


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/usr/local/lib/python3.8/site.py", line 194, in addsitedir
    known_paths = _init_pathinfo()

  File "/usr/local/lib/python3.8/site.py", line 137, in _init_pathinfo
    d = set()

SystemError: <class 'set'> returned a result with an error set

"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<frozen importlib._bootstrap>\", line 908, in _find_spec\n\nAttributeError: 'PyOtherSideQtRCImporter' object has no attribute 'find_spec'\n\n\nDuring handling of the above exception, another exception occurred:\n\n\nImportError: PyCapsule_Import could not import module \"datetime\"\n\n\nThe above exception was the direct cause of the following exception:\n\n\nTraceback (most recent call last):\n\n  File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load\n\n  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load_unlocked\n\n  File \"<frozen importlib._bootstrap>\", line 910, in _find_spec\n\n  File \"<frozen importlib._bootstrap>\", line 884, in _find_spec_legacy\n\n  File \"qrc://io/thp/pyotherside/qrc_importer.py\", line 26, in find_module\n\n  File \"qrc://io/thp/pyotherside/qrc_importer.py\", line 38, in get_filename\n\nSystemError: <built-in function qrc_is_file> returned a result with an error set\n"
Unhandled PyOtherSide error: Cannot import module: yubikey (Traceback (most recent call last):

  File "<frozen importlib._bootstrap>", line 908, in _find_spec

AttributeError: 'PyOtherSideQtRCImporter' object has no attribute 'find_spec'


During handling of the above exception, another exception occurred:


ImportError: PyCapsule_Import could not import module "datetime"


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "<frozen importlib._bootstrap>", line 991, in _find_and_load

  File "<frozen importlib._bootstrap>", line 971, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 910, in _find_spec

  File "<frozen importlib._bootstrap>", line 884, in _find_spec_legacy

  File "qrc://io/thp/pyotherside/qrc_importer.py", line 26, in find_module

  File "qrc://io/thp/pyotherside/qrc_importer.py", line 38, in get_filename

SystemError: <built-in function qrc_is_file> returned a result with an error set
)
"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nNameError: name 'yubikey' is not defined\n"
Unhandled PyOtherSide error: Function not found: 'yubikey.init' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'yubikey' is not defined

---

The yubikey not defined error then prints continuously every second or so.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2022-11-29 21:56:55 UTC
@Tim yubioath-desktop is at the same (5.0.4) version as at the time of your report, but the default Python version has changed (to 3.9).

Is this still an issue or reproducible in the latest version of the tree?
Comment 2 Tim Preston 2022-11-29 22:49:49 UTC
Hey Koobie!

I actually haven't tried in a long time. I'm on latest package repo and just now I'm getting:

Got library name:  "/usr/local/lib/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
QQmlApplicationEngine failed to load component
qrc:/qml/main.qml:63:13: Type StyledToolBar unavailable
qrc:/qml/StyledToolBar.qml:5:1: module "QtGraphicalEffects" is not installed
fish: Job 1, 'yubioath-desktop' terminated by signal SIGSEGV (Address boundary error)

I'll try from ports.
Comment 3 Tim Preston 2022-11-29 23:01:53 UTC
Installed "qt5-graphicaleffects" from pkg and yubioath-desktop from ports and now I get the original error messages:

Unhandled PyOtherSide error: Return value of PyObject call is NULL: ImportError: PyCapsule_Import could not import module "datetime"

Unhandled PyOtherSide error: Cannot import module: yubikey