Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

New python import structure does not work if SIO backend is not built #489

Closed
kjvbrt opened this issue Sep 21, 2023 · 2 comments · Fixed by #490
Closed

New python import structure does not work if SIO backend is not built #489

kjvbrt opened this issue Sep 21, 2023 · 2 comments · Fixed by #490
Assignees
Labels

Comments

@kjvbrt
Copy link
Contributor

kjvbrt commented Sep 21, 2023

when using podio-dump compiled in nightlies stack __version__.py is not installed to install directory, when installed the circular dependency emerges:

Traceback (most recent call last):
  File "/home/jsmiesko/Work/FCC/podio/install/bin/podio-dump", line 10, in <module>
    from podio import __version__
  File "/home/jsmiesko/Work/FCC/podio/install/python/podio/__init__.py", line 25, in <module>
    from . import root_io, sio_io, reading
ImportError: cannot import name 'sio_io' from partially initialized module 'podio' (most likely due to a circular import) (/home/jsmiesko/Work/FCC/podio/install/python/podio/__init__.py)
  • OS version: AlmaLinux9
  • Compiler version: GCC 11.3.1
  • PODIO version: d402f74=develop-z47c5e
  • Reproduced by: compile latest version of podio in nightlies stack
  • Input: any root file
  • Output: see above
  • Goal: dump a file
@tmadlener tmadlener changed the title __version__.py not installed + circular dependency __version__.py not installed on CentOS7 and broken python import when built without SIO Sep 21, 2023
@tmadlener tmadlener changed the title __version__.py not installed on CentOS7 and broken python import when built without SIO __version__.py not installed on AlmaLinux9 and broken python import when built without SIO Sep 21, 2023
@tmadlener tmadlener added the bug label Sep 21, 2023
@tmadlener tmadlener self-assigned this Sep 21, 2023
@tmadlener tmadlener changed the title __version__.py not installed on AlmaLinux9 and broken python import when built without SIO New python import structure does not work if SIO backend is not built Sep 21, 2023
@tmadlener
Copy link
Collaborator

After some debugging, we found that:

  • __version__.py is not installed when installing the python/podio directory via cmake, because of

    REGEX .*sio.*\\.py$ EXCLUDE # All things sio related

  • The uncoditional import of sio_io fails and raises a confusing error which hides the fact that ROOT wasn't able to load the dictionary in this case

@tmadlener
Copy link
Collaborator

Just for completeness, this was introduced with #459

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants