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

drunc doesn't work with newer versions of Python #335

Open
jcfreeman2 opened this issue Jan 14, 2025 · 0 comments
Open

drunc doesn't work with newer versions of Python #335

jcfreeman2 opened this issue Jan 14, 2025 · 0 comments
Assignees

Comments

@jcfreeman2
Copy link
Contributor

While we currently use Python 3.10.10, this isn't a problem. However, it would be nice to "future-proof" drunc. E.g., drunc runs into problems when Python 3.11.7 is used. If I try running the minimal_system_quick_test.py in a special test area which uses Python 3.11.7, NFDT_DEV_250113_A9, then I get this error message:

│    95 │   else:                                                                                        │
│    96 │   │   ## Check if the file is in the list of packaged configurations                           │
│    97 │   │   from importlib.resources import path                                                     │
│ ❱  98 │   │   packaged_configurations = os.listdir(path('drunc.data.process_manager', ''))             │
│    99 │   │   if process_manager_conf_filename in packaged_configurations:                             │
│   100 │   │   │   process_manager_conf_filename = 'file://' + str(path('drunc.data.process_man         │
│   101 │   │   else:                                                                                    │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: listdir: path should be string, bytes, os.PathLike, integer or None, not 
_GeneratorContextManager
Exiting...

n.b. To recreate this, in the work area described you'll also need to locally pip install integrationtest from the head of its develop branch so it includes Eric's fix from DUNE-DAQ/integrationtest#98 .

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

No branches or pull requests

2 participants