Home Download Buy Blog Forum Support

Python version problem Mac Os X

Python version problem Mac Os X

Postby speechkey on Tue Jul 10, 2012 3:10 pm

Hi folks,

I've just installed CTags plugin. And It dont want to work. If I select "CTags: Rebuild Tags" plugin exit with strange error message:
Code: Select all
Traceback (most recent call last):
  File "./sublime_plugin.py", line 356, in run_
  File "./ctagsplugin.py", line 597, in run
  File "./ctagsplugin.py", line 196, in find_top_folder
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/posixpath.py", line 119, in dirname
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'


I think it is common Python problem. I have other version of Python over macports installed. And use from Teminal a macports version of Python from /opt/local/bin. But Sublime seems to run buildin Python version. Can be that a problem?
speechkey
 
Posts: 4
Joined: Tue Jul 10, 2012 2:59 pm

Re: Python version problem Mac Os X

Postby quarnster on Tue Jul 10, 2012 3:16 pm

Do you have any unsaved files by any chance? Line 597 calls self.view.file_name() which will be None for unsaved files and hence you end up getting what you are seeing.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: Python version problem Mac Os X

Postby speechkey on Tue Jul 10, 2012 3:46 pm

Dear quanster,

thank you for your reply. I checked that line already and all project files was successfully saved. In addition I ran "Rebuild.." on whole project with all files closed. Tried another project — no chance.
speechkey
 
Posts: 4
Joined: Tue Jul 10, 2012 2:59 pm

Re: Python version problem Mac Os X

Postby jps on Wed Jul 11, 2012 12:28 am

This has nothing to do with python versions. The plugin is calling os.path.dirname(None), which leads to the stack trace you're seeing.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Python version problem Mac Os X

Postby sublimator on Wed Jul 11, 2012 1:51 am

.tags files are now created under the current views mountpoint, rather than in the first mountpoint


Hrmm, looks like someone handily refactored the tag finding code :/

Open an issue:
https://github.com/SublimeText/CTags/issues

Hopefully someone will sort it out
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 42 guests