astropy / astroplan

Observation planning package for astronomers – maintainer @bmorris3
https://astroplan.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
198 stars 109 forks source link

WebAssembly ImportError - add whl to PyPI #583

Open pgriffin17 opened 2 months ago

pgriffin17 commented 2 months ago

I'm trying to get astroplan running on a marimo python notebook which is online running under WebAssembly. I plan to use this notebook as an observation planning tool for several educational-use telescopes. This gives me an import error (traceback below) when I import astroplan (it automatically downloads the latest .whl available on PyPI when I ask it to import). I believe this may be due to the latest wheel being outdated (on version 0.6), as I note that the import of _get_download_cache_locs is not present in astroplan v0.6.

I think that updating the whl on PyPI may help solve this problem, so long as that is possible. Thanks!

Traceback (most recent call last):
  File "/lib/python3.12/site-packages/marimo/_runtime/runner/cell_runner.py", line 319, in run
    return_value = execute_cell(
                   ^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/marimo/_runtime/executor.py", line 75, in execute_cell
    return EXECUTION_TYPES[execution_type].execute_cell(cell, glbls, graph)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/marimo/_runtime/executor.py", line 129, in execute_cell
    exec(cell.body, glbls)
  File "/tmp/marimo_42/__marimo__cell_MJUe_.py", line 1, in <module>
    import astroplan
  File "/lib/python3.12/site-packages/astroplan/__init__.py", line 23, in <module>
    from .utils import *
  File "/lib/python3.12/site-packages/astroplan/utils.py", line 15, in <module>
    from astropy.utils.data import _get_download_cache_locs, CacheMissingWarning
ImportError: cannot import name '_get_download_cache_locs' from 'astropy.utils.data' (/lib/python3.12/site-packages/astropy/utils/data.py)