-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Attribute error when testing on system without ghostscript #3259
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
Comments
@matthew-brett Sorry for the confusion. |
No problem, sorry for mixing issues ... |
What do you get if you try to import the modules with the |
@matthew-brett I am confused, are those |
I think that the real bug is that that code even runs if gs is not installed. The code in checkdep_ghostscript in init.py should not have this issue since it correctly checks the return code. I have been touching some of this code in #3235 to silence some warnings. Perhaps the backend tests need to be wrapped with checkdep_ghostscript == true and it looks like this method is redundant anyway since checkdep_ghostscript returns the version anyway. |
Sorry Thomas - I am fool and I left some of the previous errors at the top of the issue. I was rushing with the bad internet here. I removed them, sorry to keep confusing... |
@matthew-brett No worries! |
Error on current v1.4.x is now:
https://s3.amazonaws.com/archive.travis-ci.org/jobs/30794968/log.txt |
I guess that the test should be wrapped with something like the test_savefig_to_stringio_with_usetex test does for tex.
|
I think that #3302 should resolve this issue. |
But gs_distill and xpdf_distill in backend_ps should still probably check that gs / pstopdf are available and fail with some more usefull error messages if not. I also don't think that gs_exe should just return gs if gs is not found. |
@matthew-brett Closing this, can you confirm it is really fixed? |
It isn't fixed, same error as previously, testing on current 1.4.x branch... https://s3.amazonaws.com/archive.travis-ci.org/jobs/30794968/log.txt I think the ghostscript dependency check was subtly wrong - suggest : #3312 |
With PR 3312, and switching to single-thread tests (#3314) and increasing the ulimit for Python 3.3 (#3315) - the matplotlib OSX grid is finally all green on v1.4.x: https://travis-ci.org/matthew-brett/mpl_mac_testing/builds/30950971 |
@matthew-brett Are there any further changes to mpl needed to close this or are all the remaining changes in the mac testing grid? |
No more changes needed thanks - please do close. |
This was the meat of issue #3152, but there were other failures attached to that ticket, so it got confusing. Reopening with the main issue here:
I'm getting a confusing test error when testing on OSX where ghostscript is not installed.
I am not sure what the right approach is, to avoiding this test when there is no 'gs' binary or equivalent - any advice from the experts?
https://api.travis-ci.org/jobs/28506496/log.txt?deansi=true
The error arises because
ver
in the code above is the empty string, and this is so because Popen execute ofgs --version
returns the empty string when there there is nogs
binary (around line 93 oflib/matplotlib/backends/backend_ps.py
). I guess this Popen call should raise an error (check of returncode), but I guess we also need to make sure this version check doesn't get called whengs
is not present, and I'm not sure of the cleanest way to achieve that.The text was updated successfully, but these errors were encountered: