Hi Mauro,

Update:

1. I went to the place that threw an error in the basemap code:

 >> 
"/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/basemap-0.99.1.0001-py2.5-macosx-10.3-fat.egg/mpl_toolkits/basemap/__init__.py",
 

 >> line 2501, in set_axes_limits
 >>     figManager.canvas.draw()
 >> AttributeError: 'NoneType' object has no attribute 'canvas'
 >>
 >>


The code is:

============
         # force draw if in interactive mode.
         if is_interactive():
             figManager = _pylab_helpers.Gcf.get_active()
             figManager.canvas.draw()
============


So, I changed "interactive = true" to "interactive = false" in my 
matplotlibrc file.

Now when I run "python Croizat.py", I get no error messages, and the 
graphic of a world map comes up.

I can get rivers etc. to display correctly.



2. However, I tried opening the America.prj project file, and the 
various *.csv files in the /samples directory, and couldn't get anything 
to display (perhaps because interactive mode is off?).

When I clicked on the the various analysis options (e.g. track 
analysis), I get "Number of data files must be >= 1".  This probably 
means the files aren't actually loading...


2a. Workaround: When I copied the *.prj file and the *.csv files from 
Croizat/sample to the main Croizat directory, then I was able to open 
things fine, and run the analyses.


So basically it looks like it works now.  Recommend you post this where 
appropriate for other users.

Cheers!
Nick





Nick Matzke wrote:
> Hi Mauro & Lionel,
> 
> I tried changing the backend to WX (and WxAgg) via the matplotlibrc 
> file, but got the same result.  Other suggestions welcome!
> 
> Nick
> 
> 
> WX:
> ==================
> mws2:/bioinformatics/croizat/Croizat nick$ py Croizat.py
> 
> 
> matplotlib data path 
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/matplotlib-0.98.3.0001-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data
>  
> 
> loaded rc file /Users/nick/.matplotlib/matplotlibrc
> matplotlib version 0.98.3
> verbose.level helpful
> interactive is True
> units is False
> platform is darwin
> numerix numpy 1.1.1
> $HOME=/Users/nick
> CONFIGDIR=/Users/nick/.matplotlib
> Using fontManager instance from /Users/nick/.matplotlib/fontManager.cache
> backend WX version 2.8.7.1
> Traceback (most recent call last):
>   File "Croizat.py", line 71, in <module>
>     Croizat = Application(0)
>   File 
> "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/wxPython-2.8.7.1.0003_s-py2.5-macosx-10.3-fat.egg/wx/_core.py",
>  
> line 7836, in __init__
>     self._BootstrapApp()
>   File 
> "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/wxPython-2.8.7.1.0003_s-py2.5-macosx-10.3-fat.egg/wx/_core.py",
>  
> line 7433, in _BootstrapApp
>     return _core_.PyApp__BootstrapApp(*args, **kwargs)
>   File "Croizat.py", line 62, in OnInit
>     MainWindow = MainForm(None, -1, "")
>   File "/home/maurobio/Projetos/Croizat/source/MainForm.py", line 201, 
> in __init__
>   File "/home/maurobio/Projetos/Croizat/source/MainForm.py", line 320, 
> in __do_layout
>   File "/home/maurobio/Projetos/Croizat/source/MainForm.py", line 1187, 
> in DrawMap
>   File 
> "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/basemap-0.99.1.0001-py2.5-macosx-10.3-fat.egg/mpl_toolkits/basemap/__init__.py",
>  
> line 1361, in drawcoastlines
>     self.set_axes_limits(ax=ax)
>   File 
> "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/basemap-0.99.1.0001-py2.5-macosx-10.3-fat.egg/mpl_toolkits/basemap/__init__.py",
>  
> line 2501, in set_axes_limits
>     figManager.canvas.draw()
> AttributeError: 'NoneType' object has no attribute 'canvas'
> ==================
> 
> 
> WxAgg:
> ===================
> mws2:/bioinformatics/croizat/Croizat nick$ py Croizat.py
> 
> 
> matplotlib data path 
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/matplotlib-0.98.3.0001-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data
>  
> 
> loaded rc file /Users/nick/.matplotlib/matplotlibrc
> matplotlib version 0.98.3
> verbose.level helpful
> interactive is True
> units is False
> platform is darwin
> numerix numpy 1.1.1
> $HOME=/Users/nick
> CONFIGDIR=/Users/nick/.matplotlib
> Using fontManager instance from /Users/nick/.matplotlib/fontManager.cache
> backend WXAgg version 2.8.7.1
> Traceback (most recent call last):
>   File "Croizat.py", line 71, in <module>
>     Croizat = Application(0)
>   File 
> "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/wxPython-2.8.7.1.0003_s-py2.5-macosx-10.3-fat.egg/wx/_core.py",
>  
> line 7836, in __init__
>     self._BootstrapApp()
>   File 
> "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/wxPython-2.8.7.1.0003_s-py2.5-macosx-10.3-fat.egg/wx/_core.py",
>  
> line 7433, in _BootstrapApp
>     return _core_.PyApp__BootstrapApp(*args, **kwargs)
>   File "Croizat.py", line 62, in OnInit
>     MainWindow = MainForm(None, -1, "")
>   File "/home/maurobio/Projetos/Croizat/source/MainForm.py", line 201, 
> in __init__
>   File "/home/maurobio/Projetos/Croizat/source/MainForm.py", line 320, 
> in __do_layout
>   File "/home/maurobio/Projetos/Croizat/source/MainForm.py", line 1187, 
> in DrawMap
>   File 
> "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/basemap-0.99.1.0001-py2.5-macosx-10.3-fat.egg/mpl_toolkits/basemap/__init__.py",
>  
> line 1361, in drawcoastlines
>     self.set_axes_limits(ax=ax)
>   File 
> "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/basemap-0.99.1.0001-py2.5-macosx-10.3-fat.egg/mpl_toolkits/basemap/__init__.py",
>  
> line 2501, in set_axes_limits
>     figManager.canvas.draw()
> AttributeError: 'NoneType' object has no attribute 'canvas'
> 
> 
> mws2:/bioinformatics/croizat/Croizat nick$
> ===================
> 
> 
> 
> 
> Mauro Cavalcanti wrote:
>> Dear Nick,
>>
>> I got this reply from one of the members of the Matplotlib-users
>> discussion list. I don't know if it will help, but maybe a start.
>>
>> Another suggestion I may give you just occurred me yesterday: try
>> deleting all the .pyc files included in the "Croizat" distribution
>> archive, then go to the /source sub-folder of the installation folder
>> and run the Croizat.py file from there. The Python interpreter will
>> recompile the code and rebuild the .pyc files in the source folder.
>> Maybe this will help. Anyway, let me know the results.
>>
>> With warmest regards,
>>
>>
>> ---------- Forwarded message ----------
>> From: Lionel Roubeyrie <lroubey...@limair.asso.fr>
>> Date: 2009/1/22
>> Subject: Re: [Matplotlib-users] Fwd: Croizat on Mac OS X
>> To: Matplotlib Users <matplotlib-users@lists.sourceforge.net>
>>
>>
>> Maybe a backend problem, since your soft is based on wx and the user
>> uses Tk :
>> ...
>>> Using fontManager instance from 
>>> /Users/nick/.matplotlib/fontManager.cache
>>> backend TkAgg version 8.4
>>> Traceback (most recent call last):
>>>  File "Croizat.py", line 71, in <module>
>>>    Croizat = Application(0)
>> ...
>> -- 
>> Lionel Roubeyrie
>> chargé d'études
>> LIMAIR - La Surveillance de l'Air en Limousin
>> http://www.limair.asso.fr
>>
>>
>>
>> ------------------------------------------------------------------------------
>>  
>>
>> This SF.net email is sponsored by:
>> SourcForge Community
>> SourceForge wants to tell your story.
>> http://p.sf.net/sfu/sf-spreadtheword
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
> 

-- 
====================================================
Nicholas J. Matzke
Ph.D. student, Graduate Student Researcher
Huelsenbeck Lab
Center for Theoretical Evolutionary Genomics
4151 VLSB (Valley Life Sciences Building)
Department of Integrative Biology
University of California, Berkeley

Lab websites:
http://ib.berkeley.edu/people/lab_detail.php?lab=54
http://fisher.berkeley.edu/cteg/hlab.html
Dept. personal page: 
http://ib.berkeley.edu/people/students/person_detail.php?person=370
Lab personal page: http://fisher.berkeley.edu/cteg/members/matzke.html
Lab phone: 510-643-6299
Dept. fax: 510-643-6264
Cell phone: 510-301-0179
Email: mat...@berkeley.edu

Mailing address:
Department of Integrative Biology
3060 VLSB #3140
Berkeley, CA 94720-3140

-----------------------------------------------------
"[W]hen people thought the earth was flat, they were wrong. When people 
thought the earth was spherical, they were wrong. But if you think that 
thinking the earth is spherical is just as wrong as thinking the earth 
is flat, then your view is wronger than both of them put together."

Isaac Asimov (1989). "The Relativity of Wrong." The Skeptical Inquirer, 
14(1), 35-44. Fall 1989.
http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm
====================================================

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to