I am working on automating the testing of conda environments that include pandas. I am unable to run the tests if I do not have a x11 connection setup correctly. Example:
psdev105: ~ $ python -c "import pandas; pandas.test('fast',verbose=10)"
Running unit tests for pandas
pandas version 0.19.1
numpy version 1.11.2
pandas is installed in /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel6/envs/ana-1.0.6/lib/python2.7/site-packages/pandas
Python version 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:42:40) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
nose version 1.3.7
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
X11 connection rejected because of wrong authentication.
: cannot connect to X server localhost:15.0
Are there a set of tests I can run that do not include a x11 connection?
Output of pd.show_versions()
Comment From: jreback
[jreback-~] python -c "import pandas; pandas.test('fast',verbose=10)"
Running unit tests for pandas
pandas version 0.19.1
numpy version 1.11.2
pandas is installed in /Users/jreback/miniconda3/envs/pandas/lib/python3.5/site-packages/pandas
Python version 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:52:12) [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]
nose version 1.3.7
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
/Users/jreback/miniconda3/envs/pandas/lib/python3.5/imp.py:216: FutureWarning: The pandas.rpy module is deprecated and will be removed in a future version. We refer to external packages like rpy2.
See here for a guide on how to port your code to rpy2: http://pandas.pydata.org/pandas-docs/stable/r_interface.html
return _load(spec)
test_api (pandas.api.tests.test_api.TestApi) ... ok
test_deprecation_access_func (pandas.api.tests.test_api.TestDatetools) ... ok
test_deprecation_access_obj (pandas.api.tests.test_api.TestDatetools) ... ok
The statement is a warning, so check if
[jreback-~] python -c "import warnings; warnings.warn('foobar', FutureWarning)"
-c:1: FutureWarning: foobar
though I suspect you have something odd about your setup.
Comment From: davidslac
I can tell there is something wrong with our setup regarding an x11 connection to this test machine, I'll have to work with IT to see if it can be fixed, but I was hoping to test pandas without a need for x11.
I get the same output as you with that warning, so maybe that is working Ok? The issue is that if I run pandas.test(), then it exists early with messages about x11 failure.
I suspect pandas.test is importing matplotlib or something that exits if it cannot get resources for graphics. Here is more output:
(manage) (psreldev) psel701: ~ $ ssh davidsch@psdev105 "unset PYTHONPATH; export PYTHONPATH; unset LD_LIBRARY_PATH; export LD_LIBRARY_PATH; export PATH=/reg/g/psdm/sw/conda/inst/miniconda2-prod-rhel6/bin:/re/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/kerberos/bin; sleep 1; source activate ana-1.0.5; sleep 1; python -c \"import warnings; warnings.warn('foobar', FutureWarning)\""
davidsch@psdev105's password:
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth: error in locking authority file /var/tmp/davidsch.Xauthority
-c:1: FutureWarning: foobar
so the warning works, but clearly the x11 is messed up (I think we've tried simple things to fix it in the past)
now I'll run the tests
(manage) (psreldev) psel701: ~ $ ssh davidsch@psdev105 "unset PYTHONPATH; export PYTHONPATH; unset LD_LIBRARY_PATH; export LD_LIBRARY_PATH; export PATH=/reg/g/psdm/sw/conda/inst/miniconda2-prod-rhel6/bin:/re/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/kerberos/bin; sleep 1; source activate ana-1.0.5; sleep 1; python -c \"import pandas; pandas.test('fast',verbose=10)\""
davidsch@psdev105's password:
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth: error in locking authority file /var/tmp/davidsch.Xauthority
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
X11 connection rejected because of wrong authentication.
: cannot connect to X server localhost:15.0
Running unit tests for pandas
pandas version 0.19.1
numpy version 1.11.2
pandas is installed in /reg/g/psdm/sw/conda/inst/miniconda2-prod-rhel6/envs/ana-1.0.5/lib/python2.7/site-packages/pandas
Python version 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:42:40) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
nose version 1.3.7
Like, I think the stderr output is showing up out of order, I think the pandas test start, but then that X11 failure happens soon when something requiring graphics tries to import? That's all the output, none of the pandas tests are getting run.
Comment From: jreback
no idea what you are doing. this is likely a result of your setup.
Comment From: davidslac
Ok, thanks for the quick attention! It looked to me like pandas.test() had a dependency on x11/graphics that is unnecessary, and messing things up for my setup, but its fair to consider the setup here as the culprit.
best,
David Schneider SLAC/LCLS
From: Jeff Reback [notifications@github.com] Sent: Sunday, December 4, 2016 3:36 PM To: pandas-dev/pandas Cc: Schneider, David A.; Author Subject: Re: [pandas-dev/pandas] can not run pandas unit tests without x11 connection (#14793)
no idea what you are doing. this is likely a result of your setup.
� You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/pandas-dev/pandas/issues/14793#issuecomment-264741014, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQAThQ_d12FDh_OG7fe1cCSxcyn87z1Fks5rE06DgaJpZM4LDZDW.
Comment From: jorisvandenbossche
I just tried to run the tests on a server, and it also fails at a certain point during the tests:
test_ax_plot (pandas.tseries.tests.test_plotting.TestTSPlot) ... This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Reinstalling the application may fix this problem.
Aborted (core dumped)
But, @davidslac, I do get some output (the first tests that run without problem, so I can see that it is indeed with a plotting test where the problem occurs). Do you get any output of running tests? Or does it already fail before any of the tests is run? (with the verbose=10
you should see the progress of passed/failed tests)
Not sure if we guarantee somewhere that this should work, but in any case it would be nice if this works I think.
Comment From: davidslac
Hi Joris, I don't get any output from the tests, so I can see that none of them start running, nose starts up and gives a INFO config message.
My original post involved a machine I know has some IT config issues (that I can't setup a x11 connection) so we were thinking it was on my side.
I just tried it on a "working" machine where I purposely did not setup the x11 connection, and I still get the same error.
It would be nice if you could run the tests without a x11 connection, but on the other hand, testing the plotting is important, and it is nice to find out that something is wrong and you're not testing it, so I'm thinking I'd rather get the x11 working on that machine.
best,
David Schneider SLAC/LCLS
From: Joris Van den Bossche [notifications@github.com] Sent: Monday, December 5, 2016 2:57 AM To: pandas-dev/pandas Cc: Schneider, David A.; Mention Subject: Re: [pandas-dev/pandas] can not run pandas unit tests without x11 connection (#14793)
I just tried to run the tests on a server, and it also fails at a certain point during the tests:
test_ax_plot (pandas.tseries.tests.test_plotting.TestTSPlot) ... This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".
Reinstalling the application may fix this problem. Aborted (core dumped)
But, @davidslachttps://github.com/davidslac, I do get some output (the first tests that run without problem, so I can see that it is indeed with a plotting test where the problem occurs). Do you get any output of running tests? Or does it already fail before any of the tests is run? (with the verbose=10 you should see the progress of passed/failed tests)
Not sure if we guarantee somewhere that this should work, but in any case it would be nice if this works I think.
� You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pandas-dev/pandas/issues/14793#issuecomment-264824755, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQAThWWFz-PFj8Ft5KEqThjl4JjJ0YyZks5rE-4sgaJpZM4LDZDW.