Comments (5)
This is not an astroplan
-specific issue.
The tests for other Astropy-affiliated packages fail or even crash if DISPLAY
isn't configured correctly and a matplotlib plot is made.
The solution is to set DISPLAY e.g. like this
https://github.com/astrofrog/wcsaxes/blob/master/.travis.yml#L75
# Make sure that interactive matplotlib backends work
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# Make sure matplotlib uses PyQT not PySide
- export QT_API=pyqt
Maybe @mdboom or @astrofrog can comment if there is something in the Astropy test runner that can automatically handle this?
Or maybe this is just something that should be documented for users / contributors, e.g. here?
http://astropy.readthedocs.org/en/latest/known_issues.html#build-installation-test-issues
from astroplan.
The fix @cdeil points out is the correct one. The issue is that really matplotlib should default to non-interactive Agg, but not quite sure why it doesn't when we run tests.
from astroplan.
@astrofrog I just thought of something ... can't we just add
import matplotlib
matplotlib.use('agg')
in the pytest setup (e.g. here: https://github.com/astropy/astroplan/blob/master/astroplan/conftest.py#L34) so that matplotlib tests for all users run with a non-interactive matplotlib backend?
No more fiddling with DISPLAY or pop-up windows when running the tests.
from astroplan.
@cdeil - I tried that before, but had issues with it related to the fact pytest imports the module before running its setup. In other words, astroplan
has to be imported before conftest.py
is. If importing astroplan
causes matplotlib
to be imported, then it won't work. But otherwise it's worth the try.
from astroplan.
No longer an issue, and as @cdeil points out, probably not an astroplan issue.
from astroplan.
Related Issues (20)
- plot_sky, multiple calls but only one target is shown
- Error in set time calculation HOT 1
- TIME CRITICAL OBSERVATIONS
- Remove deprecated astropy helper functions. HOT 1
- Revisit test matrix: remove python 3.7 HOT 3
- Notice: You might be using enable_deprecations_as_exceptions that is removed in astropy v6 HOT 1
- Deprecation Warnings in observer.moon_rise_time() HOT 1
- plot_sky crashes with matplotlib>v3.4.0 and astroplan v0.8 HOT 5
- TLE Target
- "Tried to do is_equivalent_frame on something that isn't frame-like" error from MoonSeparationConstraint().compute_constraint() HOT 2
- Amount of time HOT 1
- Set labels to data using plot_altitude
- MoonSeparationConstraint issue
- Potential Sunrise/Sunset Discrepancy HOT 6
- Missing targets in plot_airmass and wrong values HOT 5
- Initialize altitude constraint from profile HOT 2
- Observer sun_set_time and sun_rise_time methods crashing
- Astropy 6.0 support HOT 4
- AttributeError: 'AxesSubplot' object has no attribute 'set_theta_zero_location' HOT 2
- WebAssembly ImportError - add whl to PyPI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astroplan.