-
Notifications
You must be signed in to change notification settings - Fork 184
Issue with custom_exceptions and astropy #965
Copy link
Copy link
Closed
Description
The following demonstrates the issue:
python -m venv clean
source clean/bin/activate
pip install solara[pytest] astropy
echo 'import astropy' > test.py
pytest test.pythe output is:
______________________________________________________________________________ ERROR collecting test.py ______________________________________________________________________________
test.py:1: in <module>
import astropy
clean/lib/python3.11/site-packages/astropy/__init__.py:176: in <module>
log = _init_log()
clean/lib/python3.11/site-packages/astropy/logger.py:122: in _init_log
log._set_defaults()
clean/lib/python3.11/site-packages/astropy/logger.py:499: in _set_defaults
if self.exception_logging_enabled():
clean/lib/python3.11/site-packages/astropy/logger.py:321: in exception_logging_enabled
return _AstLogIPYExc in get_ipython().custom_exceptions
E AttributeError: 'NoneType' object has no attribute 'custom_exceptions'
============================================================================== short test summary info ===============================================================================
ERROR test.py - AttributeError: 'NoneType' object has no attribute 'custom_exceptions'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================== 1 error in 0.14s ==================================================================================
This doesn't happen if we don't install solara into the test environment.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels