matplot crases because of XDG_CONFIG_HOME variable

I am using matplotllib as part of web server. matplotlib causes my server to crash with this error:

File “/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/init.py”, line 597, in _get_configdir

return _get_config_or_cache_dir(_get_xdg_config_dir())

File “/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/init.py”, line 534, in _get_xdg_config_dir
return os.environ.get(‘XDG_CONFIG_HOME’, os.path.join(get_home(), ‘.config’))

File “/apollo/env/Ssdf/bin/…/…/…/package/local_1/Linux-2.6c2.5-x86_64/Python27/Python27-487.0-0/lib/python2.7/posixpath.py”, line 77, in join
elif path == ‘’ or path.endswith(’/’):

<type ‘exceptions.AttributeError’>: ‘NoneType’ object has no attribute ‘endswith’

I have no home directory on my server (and probably don’t have the permissions to create one). What is the correct way to fix this problem?

Thanks!

Paul

How did you install matplotlib? I’ve had success using anaconda on cheap $7/month web servers before
http://continuum.io/downloads

···

On Wed, May 7, 2014 at 7:20 AM, Paul Tremblay <paulhtremblay@…287…> wrote:

I am using matplotllib as part of web server. matplotlib causes my server to crash with this error:

File “/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/init.py”, line 597, in _get_configdir

return _get_config_or_cache_dir(_get_xdg_config_dir())

File “/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/init.py”, line 534, in _get_xdg_config_dir
return os.environ.get(‘XDG_CONFIG_HOME’, os.path.join(get_home(), ‘.config’))

File “/apollo/env/Ssdf/bin/…/…/…/package/local_1/Linux-2.6c2.5-x86_64/Python27/Python27-487.0-0/lib/python2.7/posixpath.py”, line 77, in join
elif path == ‘’ or path.endswith(‘/’):

<type ‘exceptions.AttributeError’>: ‘NoneType’ object has no attribute ‘endswith’

I have no home directory on my server (and probably don’t have the permissions to create one). What is the correct way to fix this problem?

Thanks!

Paul


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:

� 3 signs your SCM is hindering your productivity

� Requirements for releasing software faster

� Expert tips and advice for migrating your SCM now

http://p.sf.net/sfu/perforce


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I am using our companies pacaking system. The version of matplotlib is 1.3.1, by the way.

···

On Wed, May 7, 2014 at 11:32 AM, Paul Hobson <pmhobson@…287…> wrote:

How did you install matplotlib? I’ve had success using anaconda on cheap $7/month web servers before
http://continuum.io/downloads

On Wed, May 7, 2014 at 7:20 AM, Paul Tremblay <paulhtremblay@…287…> wrote:

I am using matplotllib as part of web server. matplotlib causes my server to crash with this error:

File “/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/init.py”, line 597, in _get_configdir

return _get_config_or_cache_dir(_get_xdg_config_dir())

File “/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/init.py”, line 534, in _get_xdg_config_dir
return os.environ.get(‘XDG_CONFIG_HOME’, os.path.join(get_home(), ‘.config’))

File “/apollo/env/Ssdf/bin/…/…/…/package/local_1/Linux-2.6c2.5-x86_64/Python27/Python27-487.0-0/lib/python2.7/posixpath.py”, line 77, in join
elif path == ‘’ or path.endswith(‘/’):

<type ‘exceptions.AttributeError’>: ‘NoneType’ object has no attribute ‘endswith’

I have no home directory on my server (and probably don’t have the permissions to create one). What is the correct way to fix this problem?

Thanks!

Paul


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:

� 3 signs your SCM is hindering your productivity

� Requirements for releasing software faster

� Expert tips and advice for migrating your SCM now

http://p.sf.net/sfu/perforce


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I’ve discovered the problem and a fix. $HOME is set to /home/ptremblay, but /home/ptremblay does not exist. If I do:

import os
try:
import matplotlib
except AttributeError as msg:

    os.environ['HOME'] = '/apollo/env/Ssdf/var/home_config/'
    import matplotlib

Then I can import the library.

···

On Wed, May 7, 2014 at 11:50 AM, Paul Tremblay <paulhtremblay@…1972…> wrote:

I am using our companies pacaking system. The version of matplotlib is 1.3.1, by the way.

On Wed, May 7, 2014 at 11:32 AM, Paul Hobson <pmhobson@…287…> wrote:

How did you install matplotlib? I’ve had success using anaconda on cheap $7/month web servers before
http://continuum.io/downloads

On Wed, May 7, 2014 at 7:20 AM, Paul Tremblay <paulhtremblay@…287…> wrote:

I am using matplotllib as part of web server. matplotlib causes my server to crash with this error:

File “/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/init.py”, line 597, in _get_configdir

return _get_config_or_cache_dir(_get_xdg_config_dir())

File “/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/init.py”, line 534, in _get_xdg_config_dir
return os.environ.get(‘XDG_CONFIG_HOME’, os.path.join(get_home(), ‘.config’))

File “/apollo/env/Ssdf/bin/…/…/…/package/local_1/Linux-2.6c2.5-x86_64/Python27/Python27-487.0-0/lib/python2.7/posixpath.py”, line 77, in join
elif path == ‘’ or path.endswith(‘/’):

<type ‘exceptions.AttributeError’>: ‘NoneType’ object has no attribute ‘endswith’

I have no home directory on my server (and probably don’t have the permissions to create one). What is the correct way to fix this problem?

Thanks!

Paul


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:

� 3 signs your SCM is hindering your productivity

� Requirements for releasing software faster

� Expert tips and advice for migrating your SCM now

http://p.sf.net/sfu/perforce


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

However, this really is a bug. I have spent about two hours trying to get this to work on EC.

Where to I file bugs?

P.

···

On Wed, May 7, 2014 at 1:29 PM, Paul Tremblay <paulhtremblay@…287…> wrote:

I’ve discovered the problem and a fix. $HOME is set to /home/ptremblay, but /home/ptremblay does not exist. If I do:

import os
try:
import matplotlib
except AttributeError as msg:

    os.environ['HOME'] = '/apollo/env/Ssdf/var/home_config/'
    import matplotlib

Then I can import the library.

On Wed, May 7, 2014 at 11:50 AM, Paul Tremblay <paulhtremblay@…1972…> wrote:

I am using our companies pacaking system. The version of matplotlib is 1.3.1, by the way.

On Wed, May 7, 2014 at 11:32 AM, Paul Hobson <pmhobson@…287…> wrote:

How did you install matplotlib? I’ve had success using anaconda on cheap $7/month web servers before
http://continuum.io/downloads

On Wed, May 7, 2014 at 7:20 AM, Paul Tremblay <paulhtremblay@…287…> wrote:

I am using matplotllib as part of web server. matplotlib causes my server to crash with this error:

File “/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/init.py”, line 597, in _get_configdir

return _get_config_or_cache_dir(_get_xdg_config_dir())

File “/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/init.py”, line 534, in _get_xdg_config_dir
return os.environ.get(‘XDG_CONFIG_HOME’, os.path.join(get_home(), ‘.config’))

File “/apollo/env/Ssdf/bin/…/…/…/package/local_1/Linux-2.6c2.5-x86_64/Python27/Python27-487.0-0/lib/python2.7/posixpath.py”, line 77, in join
elif path == ‘’ or path.endswith(‘/’):

<type ‘exceptions.AttributeError’>: ‘NoneType’ object has no attribute ‘endswith’

I have no home directory on my server (and probably don’t have the permissions to create one). What is the correct way to fix this problem?

Thanks!

Paul


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:

� 3 signs your SCM is hindering your productivity

� Requirements for releasing software faster

� Expert tips and advice for migrating your SCM now

http://p.sf.net/sfu/perforce


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Hi Paul and Paul,

I thought I'd pile onto this Paul Pile...

Paul Tremblay, on 2014-05-15 16:33, wrote:

However, this really is a bug. I have spent about two hours trying to get
this to work on EC.

Where to I file bugs?

Here's a recent issue which may be related to yours,

but if that doesn't capture the problem you are seeing, and you
don't find an issue open for the behavior you're seeing, please
open a new one.

best,

···

--
                   _
                  / \
                A* \^ -
             ,./ _.`\\ / \
            / ,--.S \/ \
           / `"~,_ \ \
     __o ?
   _ \<,_ /:\
--(_)/-(_)----.../ | \
--------------.......J
Paul Ivanov
http://pirsquared.org

Thanks. New issue submitted.

In my humble opinion, the creation of a home configuration directory should be optional, only implemented by an option from the command line. Otherwise, a small detail like creating a directory can cause major headaches.

···

On Thu, May 15, 2014 at 4:43 PM, Paul Ivanov <pi@…1016…> wrote:

Hi Paul and Paul,

I thought I’d pile onto this Paul Pile…

Paul Tremblay, on 2014-05-15 16:33, wrote:

However, this really is a bug. I have spent about two hours trying to get

this to work on EC.

Where to I file bugs?

https://github.com/matplotlib/matplotlib/issues

Here’s a recent issue which may be related to yours,

https://github.com/matplotlib/matplotlib/issues/3062

but if that doesn’t capture the problem you are seeing, and you

don’t find an issue open for the behavior you’re seeing, please

open a new one.

best,

               _

              / \

            A*   \^   -

         ,./   _.`\\ / \

        / ,--.S    \/   \

       /  `"~,_     \    \

 __o           ?

_ <,_ /:\

–()/-()----…/ | \

--------------…J

Paul Ivanov

http://pirsquared.org


"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE

Instantly run your Selenium tests across 300+ browser/OS combos.

Get unparalleled scalability from the best Selenium testing platform available

Simple to use. Nothing to install. Get started now for free."

http://p.sf.net/sfu/SauceLabs


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users