Skip to content

ImportError: cannot import name 'base' from partially initialized module 'openant' (most likely due to a circular import) (/usr/lib/python3.13/site-packages/openant/__init__.py) #114

@carlosal1015

Description

@carlosal1015

After installing python-openant in Arch Linux, the module cannot be imported. We are using python-3.13.2-1.

=> Making package: python-openant 1.3.2-1 (Sun Mar 16 12:03:36 2025)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Package (3)         New Version  Net Change  Download Size

core/mpdecimal      4.0.0-2        0.32 MiB       0.10 MiB
core/python         3.13.2-1      67.62 MiB      12.28 MiB
extra/python-pyusb  1.2.1-6        0.64 MiB       0.10 MiB

Total Download Size:   12.47 MiB
Total Installed Size:  68.58 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 python-3.13.2-1-x86_64 downloading...
 mpdecimal-4.0.0-2-x86_64 downloading...
 python-pyusb-1.2.1-6-any downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing mpdecimal...
installing python...
Optional dependencies for python
    python-setuptools: for building Python packages using tooling that is usually bundled with Python
    python-pip: for installing Python packages using tooling that is usually bundled with Python
    python-pipx: for installing Python software not packaged on Arch Linux
    sqlite: for a default database integration [installed]
    xz: for lzma [installed]
    tk: for tkinter
installing python-pyusb...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Package (16)                     New Version  Net Change  Download Size

extra/python-autocommand         2.2.2-7        0.08 MiB       0.02 MiB
extra/python-iniconfig           2.0.0-6        0.04 MiB       0.01 MiB
extra/python-jaraco.collections  5.1.0-1        0.10 MiB       0.02 MiB
extra/python-jaraco.context      6.0.1-1        0.04 MiB       0.01 MiB
extra/python-jaraco.functools    4.1.0-1        0.07 MiB       0.02 MiB
extra/python-jaraco.text         4.0.0-2        0.08 MiB       0.02 MiB
extra/python-more-itertools      10.6.0-1       0.66 MiB       0.11 MiB
extra/python-packaging           24.2-3         0.66 MiB       0.12 MiB
extra/python-platformdirs        4.3.6-2        0.24 MiB       0.03 MiB
extra/python-pluggy              1.5.0-3        0.20 MiB       0.04 MiB
extra/python-pyproject-hooks     1.2.0-3        0.10 MiB       0.02 MiB
extra/python-build               1.2.2-3        0.20 MiB       0.05 MiB
extra/python-installer           0.7.0-10       0.17 MiB       0.04 MiB
extra/python-pytest              1:8.3.5-1      3.93 MiB       0.69 MiB
extra/python-setuptools          1:75.8.0-1     8.15 MiB       1.27 MiB
extra/python-wheel               0.45.0-3       0.28 MiB       0.07 MiB

Total Download Size:    2.56 MiB
Total Installed Size:  15.01 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 python-setuptools-1:75.8.0-1-any downloading...
 python-pytest-1:8.3.5-1-any downloading...
 python-packaging-24.2-3-any downloading...
 python-more-itertools-10.6.0-1-any downloading...
 python-wheel-0.45.0-3-any downloading...
 python-build-1.2.2-3-any downloading...
 python-pluggy-1.5.0-3-any downloading...
 python-installer-0.7.0-10-any downloading...
 python-platformdirs-4.3.6-2-any downloading...
 python-autocommand-2.2.2-7-any downloading...
 python-jaraco.collections-5.1.0-1-any downloading...
 python-pyproject-hooks-1.2.0-3-any downloading...
 python-jaraco.text-4.0.0-2-any downloading...
 python-jaraco.functools-4.1.0-1-any downloading...
 python-iniconfig-2.0.0-6-any downloading...
 python-jaraco.context-6.0.1-1-any downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing python-packaging...
installing python-pyproject-hooks...
installing python-build...
Optional dependencies for python-build
    python-pip: to use as the Python package installer (default)
    python-uv: to use as the Python package installer
    python-virtualenv: to use virtualenv for build isolation
installing python-installer...
installing python-more-itertools...
installing python-jaraco.functools...
installing python-jaraco.context...
installing python-autocommand...
installing python-jaraco.text...
Optional dependencies for python-jaraco.text
    python-inflect: for show-newlines script
installing python-jaraco.collections...
installing python-platformdirs...
installing python-wheel...
Optional dependencies for python-wheel
    python-keyring: for wheel.signatures
    python-xdg: for wheel.signatures
    python-setuptools: for legacy bdist_wheel subcommand [pending]
installing python-setuptools...
installing python-iniconfig...
installing python-pluggy...
installing python-pytest...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Retrieving sources...
  -> Downloading openant-1.3.2.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 62489    0 62489    0     0  46987      0 --:--:--  0:00:01 --:--:--  125k
==> Validating source files with sha512sums...
    openant-1.3.2.tar.gz ... Passed
==> Extracting sources...
  -> Extracting openant-1.3.2.tar.gz with bsdtar
==> Starting build()...
* Building wheel...
running bdist_wheel
running build
running build_py
creating build/lib/openant
copying openant/__init__.py -> build/lib/openant
copying openant/udev_rules.py -> build/lib/openant
copying openant/__main__.py -> build/lib/openant
running egg_info
creating openant.egg-info
writing openant.egg-info/PKG-INFO
writing dependency_links to openant.egg-info/dependency_links.txt
writing entry points to openant.egg-info/entry_points.txt
writing requirements to openant.egg-info/requires.txt
writing top-level names to openant.egg-info/top_level.txt
writing manifest file 'openant.egg-info/SOURCES.txt'
reading manifest file 'openant.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'openant.egg-info/SOURCES.txt'
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/openant
copying build/lib/openant/__init__.py -> build/bdist.linux-x86_64/wheel/./openant
copying build/lib/openant/udev_rules.py -> build/bdist.linux-x86_64/wheel/./openant
copying build/lib/openant/__main__.py -> build/bdist.linux-x86_64/wheel/./openant
running install_egg_info
Copying openant.egg-info to build/bdist.linux-x86_64/wheel/./openant-1.3.2-py3.13.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/openant-1.3.2.dist-info/WHEEL
creating '/tmp/makepkg/python-openant/src/openant-1.3.2/dist/.tmp-d8isukew/openant-1.3.2-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'openant/__init__.py'
adding 'openant/__main__.py'
adding 'openant/udev_rules.py'
adding 'openant-1.3.2.dist-info/LICENSE'
adding 'openant-1.3.2.dist-info/METADATA'
adding 'openant-1.3.2.dist-info/WHEEL'
adding 'openant-1.3.2.dist-info/entry_points.txt'
adding 'openant-1.3.2.dist-info/top_level.txt'
adding 'openant-1.3.2.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built openant-1.3.2-py3-none-any.whl
==> Starting check()...
=================================================================================== test session starts ====================================================================================
platform linux -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 -- /usr/sbin/python
cachedir: .pytest_cache
rootdir: /tmp/makepkg/python-openant/src/openant-1.3.2
configfile: pyproject.toml
collected 13 items                                                                                                                                                                         

openant/tests/base/test_message.py::MessageParse::test_message_code_lookup PASSED                                                                                                    [  7%]
openant/tests/base/test_message.py::MessageParse::test_message_code_lookup_fail PASSED                                                                                               [ 15%]
openant/tests/base/test_message.py::MessageParse::test_message_parse PASSED                                                                                                          [ 23%]
openant/tests/fs/test_beacon.py::BeaconParseTest::test_beacon_parse PASSED                                                                                                           [ 30%]
openant/tests/fs/test_command.py::AuthenticateCommandTest::test_pairing PASSED                                                                                                       [ 38%]
openant/tests/fs/test_command.py::AuthenticateCommandTest::test_serial PASSED                                                                                                        [ 46%]
openant/tests/fs/test_command.py::DownloadRequestTest::test PASSED                                                                                                                   [ 53%]
openant/tests/fs/test_command.py::DownloadResponseTest::test_not_readable PASSED                                                                                                     [ 61%]
openant/tests/fs/test_command.py::DownloadResponseTest::test_ok PASSED                                                                                                               [ 69%]
openant/tests/fs/test_commandpipe.py::CreateFileTest::runTest PASSED                                                                                                                 [ 76%]
openant/tests/fs/test_commandpipe.py::TimeTest::runTest PASSED                                                                                                                       [ 84%]
openant/tests/fs/test_file.py::DirectoryParse::test_parse PASSED                                                                                                                     [ 92%]
openant/tests/fs/test_file.py::FileParse::test_parse PASSED                                                                                                                          [100%]

==================================================================================== 13 passed in 0.06s ====================================================================================
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "python-openant"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: python-openant 1.3.2-1 (Sun Mar 16 12:04:06 2025)
$ sudo pacman -U python-openant-1.3.2-1-any.pkg.tar.zst 
loading packages...
resolving dependencies...
looking for conflicting packages...

Package (1)     New Version  Net Change

python-openant  1.3.2-1        0.02 MiB

Total Installed Size:  0.02 MiB

:: Proceed with installation? [Y/n] 
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing python-openant...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
$ pacman -Ql python-openant
python-openant /usr/
python-openant /usr/bin/
python-openant /usr/bin/openant
python-openant /usr/lib/
python-openant /usr/lib/python3.13/
python-openant /usr/lib/python3.13/site-packages/
python-openant /usr/lib/python3.13/site-packages/openant-1.3.2.dist-info/
python-openant /usr/lib/python3.13/site-packages/openant-1.3.2.dist-info/LICENSE
python-openant /usr/lib/python3.13/site-packages/openant-1.3.2.dist-info/METADATA
python-openant /usr/lib/python3.13/site-packages/openant-1.3.2.dist-info/RECORD
python-openant /usr/lib/python3.13/site-packages/openant-1.3.2.dist-info/WHEEL
python-openant /usr/lib/python3.13/site-packages/openant-1.3.2.dist-info/entry_points.txt
python-openant /usr/lib/python3.13/site-packages/openant-1.3.2.dist-info/top_level.txt
python-openant /usr/lib/python3.13/site-packages/openant/
python-openant /usr/lib/python3.13/site-packages/openant/__init__.py
python-openant /usr/lib/python3.13/site-packages/openant/__main__.py
python-openant /usr/lib/python3.13/site-packages/openant/udev_rules.py
python-openant /usr/share/
python-openant /usr/share/licenses/
python-openant /usr/share/licenses/python-openant/
python-openant /usr/share/licenses/python-openant/LICENSE
$ python
Python 3.13.2 (main, Feb  5 2025, 08:05:21) [GCC 14.2.1 20250128] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import openant
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import openant
  File "/usr/lib/python3.13/site-packages/openant/__init__.py", line 28, in <module>
    from . import base
ImportError: cannot import name 'base' from partially initialized module 'openant' (most likely due to a circular import) (/usr/lib/python3.13/site-packages/openant/__init__.py)

https://aur.archlinux.org/packages/python-openant#comment-1015295

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions