gepd / Deviot

Sublime Text plugin for IoT development based in PlatformIO ecosystem (Arduino IDE)
Apache License 2.0
307 stars 56 forks source link

dev new error suddenly #267

Closed tablatronix closed 5 years ago

tablatronix commented 5 years ago

I was using it, and all of a sudden this happened anytime I run anything...

osx

Any ideas?

[ Deviot 2.3.0.dev8 ] Starting...
Traceback (most recent call last):
  File "/usr/local/bin/platformio", line 9, in <module>
    load_entry_point('platformio==3.6.0a10', 'console_scripts', 'platformio')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2696, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'platformio') not found

[Mon Dec 10 10:03:31 2018]
tablatronix commented 5 years ago

I removed user/penv

now I get

Exception in thread Thread-24:
Traceback (most recent call last):
  File "./python3.3/json/decoder.py", line 367, in raw_decode
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "/Users/.../Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/platformio/upload.py", line 71, in start_upload
    if(not self.check_auth_ota()):
  File "/Users/.../Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/libraries/project_check.py", line 289, in check_auth_ota
    platform = self.get_platform()
  File "/Users/.../Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/libraries/preferences_bridge.py", line 115, in get_platform
    boards = boards_file.read_json()
  File "/Users/.../Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/libraries/file.py", line 57, in read_json
    return json.loads(file)
  File "./python3.3/json/__init__.py", line 316, in loads
  File "./python3.3/json/decoder.py", line 351, in decode
  File "./python3.3/json/decoder.py", line 369, in raw_decode
ValueError: No JSON object could be decoded
tablatronix commented 5 years ago

run platformio from terminal I get pkg_resources.DistributionNotFound: The 'platformio==3.6.0a10' distribution was not found and is required by the application

tablatronix commented 5 years ago

uncheck use development version, says installing stable, there was an error

gepd commented 5 years ago

what O.S it's given you this error?

tablatronix commented 5 years ago

sorry it was not very obvious in first post

Osx mojave

gepd commented 5 years ago

The fastest solution would be install platformio from Homebrew and then removeuser / Deviot to deviot recognize it

tablatronix commented 5 years ago

Yeah its bizarre, platformio said create a bug report, no idea where that alpha version that doesnt exists is coming from, going to wipe it, what deviot files do I need to restore all my settings?

gepd commented 5 years ago

If you were using PlatformIO installed from Deviot, all files are located in User/Deviot The penv folder stores PIO, and the rest of the files are for configuration. If you remove User/Deviot and restart ST, Deviot will install the stable version of PIO again

tablatronix commented 5 years ago

Yeah I tried all the usual stuff already, deviot didnt do anything when I remove it (penv) and start sublime.

Isnt my saved settings in there also ?

gepd commented 5 years ago

Isn't, you should remove User/Deviot or the deviot.ini file in the same folder

tablatronix commented 5 years ago

ok I reinstalled and the boards.json file has stderr out in it, so that is one problem there, it should be empty or something, so it can be detected and not just puke I guess.

boards.json

Traceback (most recent call last):
  File "/usr/local/bin/platformio", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3095, in <module>
    @_call_aside
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3081, in _call_aside
    f(*args, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 658, in _build_master
    ws.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 959, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 846, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'platformio==3.6.0a10' distribution was not found and is required by the application
tablatronix commented 5 years ago

So it looks like a pio issue that created this

https://community.platformio.org/t/vsc-the-platformio-3-5-0a17-distribution-was-not-found-and-is-required-by-the-application/2855

tablatronix commented 5 years ago

I would still love to fix this darn macbook, so it stops using global python and pio, I still have no idea wtf is wrong with it

tablatronix commented 5 years ago

This is my path for reference maybe someone will know something, Could it be a problem with sublime ? I have not reinstalled it

/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Users/.../Library/Python/2.7/bin
/Applications/Wireshark.app/Contents/MacOS
tablatronix commented 5 years ago

ok I think I am back in business, I removed platformio, pio from /usr/local/bin and removed deviot.ini, and removed junk from boards.json and restarted