theolind / pymysensors

Python API for talking to a MySensors gateway
MIT License
63 stars 43 forks source link

Version file not found #240

Closed flatsiedatsie closed 4 years ago

flatsiedatsie commented 4 years ago

I've been getting an error very recently:

Traceback (most recent call last):
  File "bootstrap.py", line 45, in <module>
    import mysensors  # noqa: F401
  File "/home/pi/.mozilla-iot/addons/mysensors-adapter/lib/mysensors/__init__.py", line 19, in <module>
    __version__ = (Path(__file__).parent / "VERSION").read_text().strip()
  File "/usr/lib/python3.7/pathlib.py", line 1199, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/usr/lib/python3.7/pathlib.py", line 1186, in open
    opener=self._opener)
  File "/usr/lib/python3.7/pathlib.py", line 1039, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.mozilla-iot/addons/mysensors-adapter/lib/mysensors/VERSION'

I checked, and the VERSION file isn't in the folder. If I add it manually, the script continues normally.

Here's the source: https://github.com/createcandle/Webthings-mysensors-adapter/blob/master/bootstrap.py

I'm trying to figure out what it could be. Some PIP3 caching issue? Perhaps the existing files may be updated, but a rights issue is preventing VERSION from being created?

MartinHjelmare commented 4 years ago

This is a problem for the wheels release but not for the source release. Fix is in #241.

MartinHjelmare commented 4 years ago

0.20.1 released with fix: https://pypi.org/project/pymysensors/0.20.1/