-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rubocop >= 0.36 AttributeError: 'NoneType' object has no attribute 'rfind' #45
Comments
Hi, thanks for the detailed report. Unfortunately I was not able to reproduce the issue with version 0.40.0 of rubocop (tested on Windows 10 and Mac OS, with Sublime Text - Build 3114). Can you verify the problem is still present when you update rubocop to 0.40.0? Thanks. |
Thanks for trying to reproduce the issue. It still happens to me on 0.40.0. Could this maybe be a python version issue? I show the following in an OSX console:
|
I started having this issue a few days ago. Probably an OSX update problem, which indeed may be related to the python version chaning. I also have Python 2.7.10 on OSX 10.11.6 (15G31) |
@pderichs, I too have this issue and have |
Hi, @JoshMcKin I am running python 2.7.12. I tried to reproduce the issue a second time, but unfortunately everything worked fine for me. So let's check whether there is a difference in our setup. Here is my setup (should be the latest / stable versions): Versions: My plugin configuration looks like this:
Please try again with the same setup. Thanks. |
@pderichs I think the problem is probably related to our .rubocop.yml. It has some legacy settings that in other IDE pluggins show error messages when loaded. |
Can you share your rubocop.yml? |
For what it's worth, I'm running into the same issue. My rubocop.yml is below. Using rubcop 0.57.2
|
@pderichs I'm having the same issue on Stacktrace is still the same (except with GNU Linux paths instead of OS/X paths): Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 525, in on_load_async
callback.on_load_async(v)
File "/some/user/path/sublime-text-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 141, in on_load_async
self.do_in_file_check(view)
File "/some/user/path/sublime-text-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 128, in do_in_file_check
self.mark_issues(view, mark)
File "/some/user/path/sublime-text-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 122, in mark_issues
self.set_marks_by_results(view, results)
File "/some/user/path/sublime-text-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 58, in set_marks_by_results
base_file = os.path.basename(path)
File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
{
"mark_issues_in_view": true,
"check_for_rvm": false,
"check_for_rbenv": true,
"show_auto_correct_warning": false,
"rbenv_path": "~/.rbenv/bin/rbenv",
"rubocop_config_file": "./.rubocop.yml"
} I'm not a Python developer, but I had a look regarding the stack trace and could it be that |
Steps to reproduce:
gem install rubocop -v 0.35.0
gem install rubocop -v 0.36.0
The text was updated successfully, but these errors were encountered: