JulianEberius / SublimeRope

ST2 only, use SublimePythonIDE with ST3: Adds Python completions and some IDE-like functions to Sublime Text 2, through the use of the Rope library
GNU General Public License v2.0
250 stars 26 forks source link

Exception on unsaved views #75

Open bizoo opened 11 years ago

bizoo commented 11 years ago

This exception probably happen because of new unsaved view, which view.file_name() return None:

Traceback (most recent call last):
  File ".\sublime_plugin.py", line 175, in on_load
  File ".\sublime_plugin.py", line 154, in run_timed_function
  File ".\sublime_plugin.py", line 174, in <lambda>
  File ".\sublime_rope.py", line 436, in on_load
    self._check(view)
  File ".\sublime_rope.py", line 478, in _check
    view.file_name().encode('utf-8')
AttributeError: 'NoneType' object has no attribute 'encode'