bradfeehan / SublimePHPCoverage

A plugin for Sublime Text 2 and 3, which visualises PHP code coverage data in the editor.
MIT License
57 stars 10 forks source link

More detailed errors #10

Closed alfonsoabad closed 11 years ago

alfonsoabad commented 11 years ago

It would be nice to have a message window if any needed file doesn't exists, or some other predictable errors, it will make the package more robust. I still not sure what is the error .. this is the console output.

SublimeLinter: php enabled (using "php" for executable)
Writing file /Users/alfonso/code/phpQ/src/Acme/Movie.php with encoding UTF-8
Traceback (most recent call last):
  File "./sublime_plugin.py", line 322, in run_
  File "./SublimePHPCoverage.py", line 152, in run
  File "./SublimePHPCoverage.py", line 54, in shell_exec
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 623, in __init__
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child
OSError: [Errno 2] No such file or directory
SublimeLinter: python enabled (built in)
Reloading plugin /Users/alfonso/Library/Application Support/Sublime Text 2/Packages/SublimePHPCoverage/SublimePHPCoverage.py
Writing file /Users/alfonso/code/phpQ/src/Acme/Movie.php with encoding UTF-8
Traceback (most recent call last):
  File "./sublime_plugin.py", line 322, in run_
  File "./SublimePHPCoverage.py", line 150, in run
  File "./SublimePHPCoverage.py", line 50, in shell_exec
TypeError: cannot concatenate 'str' and 'NoneType' objects
found 1 files for base name Default.sublime-theme
theme loaded
Reloading /Users/alfonso/Library/Application Support/Sublime Text 2/Packages/SublimePHPCoverage/SublimePHPCoverage.py

I'll try to dig a bit more on it and update this issue, I'm working on mac os 10.8.2 python 2.7.3

bradfeehan commented 11 years ago

The error seems to be coming from SublimePHPCoverage.py:50. Is the line I've linked to the same as the one you're running?

If so, it seems like this is happening because the plugin makes the assumption that you have a Sublime project open. Try Project -> Add Folder to Project..., and then Project -> Save Project As... in Sublime, let me know if that fixes the problem.

I'm not sure if/how the plugin should find your coverage data if you aren't using a project. What's your setup like? Where is the coverage data file located in your project?

alfonsoabad commented 11 years ago

yeah, ok I was not in a project, sorry , I reinstalled the plugin, and now with a project, with the clover file in place, and lots of <file entries (only have 40% coverage) I update with cmd + shift + C and nothing happens, I can't see the markers or any error in the console

only when executing from MEnu -> Php Coverage -> update current file I get the error Traceback (most recent call last): File "./sublimeplugin.py", line 362, in run File "./SublimePHPCoverage.py", line 74, in run File "./SublimePHPCoverage.py", line 37, in debug_message File "./SublimePHPCoverage.py", line 21, in get AttributeError: 'NoneType' object has no attribute 'settings'

any idea?

brodkin commented 11 years ago

I've also encountered this, but only under very specific (yet to be determined) circumstances.