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.

TST: importlib usage broke pyinstaller cron job

See original GitHub issue

#11714 broken pyinstaller job. Any idea how to fix, @saimn or @mhvk ?

Example log: https://github.com/astropy/astropy/runs/3551720784?check_suite_focus=true

pyinstaller run-test: commands[1] | ./run_astropy_tests
Traceback (most recent call last):
  File "astropy/utils/introspection.py", line 154, in minversion
  File "importlib/metadata.py", line 530, in version
  File "importlib/metadata.py", line 503, in distribution
  File "importlib/metadata.py", line 177, in from_name
importlib.metadata.PackageNotFoundError: numpy

...

  File ".../PyInstaller/loader/pyimod03_importers.py", line 489, in exec_module
    exec(bytecode, module.__dict__)
  File "astropy/utils/compat/numpycompat.py", line 13, in <module>
  File "astropy/utils/decorators.py", line 536, in wrapper
  File "astropy/utils/introspection.py", line 161, in minversion
KeyError: 'numpy'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
astrofrogcommented, Sep 16, 2021

I’ve managed to get beyond the metadata.version error - but I’m now running into bizarre numpy.distutils errors, mainly related to convolution and the use of ctypes.

I do think we should re-work the convolution extension to not use ctypes to load the extension but just use the regular C extension approach used by other modules, for consistency…

1reaction
mhvkcommented, Sep 9, 2021

I think the weird thing is that metadata.version('numpy') apparently failed in the first part of the try/except - how can numpy be available and not found!?

Read more comments on GitHub >

github_iconTop Results From Across the Web

importlib cannot find module after compling using Pyinstaller
I have a main script that import the module from another script (sub_script.py) using importlib. I also ...
Read more >
Pyinstaller throws "Import Error:requests> 2.18.0 is required by ...
Coding example for the question Pyinstaller throws "Import Error:requests> 2.18.0 is required by the google.resumable media.requests subpackage."
Read more >
subject:"\[PyInstaller\] pyinstaller" - The Mail Archive
Hi, I am trying to run a cron job on a Unix executable and I receive the following error: "Cannot open PyInstaller archive...
Read more >
Python Package Best Practices - MolSSI Education
For this workshop, we are going to create a Python package that performs analysis and creates visualizations for molecules. We will start from...
Read more >
Traits CHANGELOG — Traits 6.4 Documentation
Use of add_class_trait to add a List trait was broken in the presence of ... Add cron-job workflow to regularly test install of...
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