ameyp / CscopeSublime

A Cscope plugin for Sublime Text 2 and 3
89 stars 37 forks source link

TypeError: 'NoneType' object is not subscriptable #58

Closed DimaWittmann closed 7 years ago

DimaWittmann commented 7 years ago

Hi, every one, I got this error on Sublime Text 3,

Traceback (most recent call last): File "/opt/sublime_text/sublimeplugin.py", line 812, in run return self.run(edit, **args) File "/home/wittmann/.config/sublime-text-3/Packages/CscopeSublime/cscope.py", line 467, in run self.database.update_location(self.view.file_name()) File "/home/wittmann/.config/sublime-text-3/Packages/CscopeSublime/cscope.py", line 60, in update_location project_info_paths = [folder['path'] for folder in project_info['folders']] TypeError: 'NoneType' object is not subscriptable

Thank you, Dmytrii

vanrijn commented 7 years ago

Hey @DimaWittmann, thanks so much for the bug report. Could you please attach or paste the project file that you're using when you hit this error? I'm not sure how you're able to hit this error in particular. =:) Thanks!

vanrijn commented 7 years ago

I just pushed a change up to see if it might fix this, @DimaWittmann. Can you please let me know if this fixes the problem for you? Also, please do let me see the project file you're working with that triggered this error so I can make sure the problem is fully fixed. Thank you again! =:)

DimaWittmann commented 7 years ago

Thank you, it helps. I did not create project file in sublime, is it get created automatically when I just open files? I mean I did not create a project in sublime. Should I?

I also has another problems that when I call cscope, close cscope tab and rerun cscope, sublime opens two tabs. And so on as I open more tabs and close them.

vanrijn commented 7 years ago

Okay so it sounds like you don't see this crash anymore and that's a good thing. =:) @DimaWittmann can you please open a new issue for the multiple tab issue that you're seeing so I can look into it? Thanks!!

DimaWittmann commented 7 years ago

Okay, Thank you!)