web2py / web2py

Free and open source full-stack enterprise framework for agile development of secure database-driven web-based applications, written and programmable in Python.
http://www.web2py.com
Other
2.11k stars 886 forks source link

Cannot import matplotlib.pylab in web2py environment (python3) #2010

Open leohaim opened 6 years ago

leohaim commented 6 years ago

Describe the bug When I change your welcome example such that I add "import matplotlib.pylab" as first line of the control file "default.py"

I am getting the error: 127.0.0.1.2018-09-14.00-34-40.fce2605f-9ede-4fc8-85dd-b8e2faf76389 <class 'AttributeError'> 'NoneType' object has no attribute 'strip'

If I am importing matplotlib only: import matplotlib it works, but of cours I cannot create plots.

I am using the latest Anaconda distribution (python 3.6.6, matplotlib 2.2.3) on CentOS 6. I am using the latest web2py Version 2.17.1-stable+timestamp.2018.08.06.01.02.56

The detailed output is attached

matplotlibbug.zip

veiko99 commented 5 years ago

1998

veiko99 commented 5 years ago

It may be matplotlib issue. Does "import matplotlib.pylab" work inside python command line?
Also you may get better error message if you run latest web2py code from master branch.

leohaim commented 5 years ago

Indeed. It went away when I upgraded to python 3.7 and Matplotlib 3.0.2 For me the issue is now closed.