hidaris / thingtalk

WebThings framework.
Mozilla Public License 2.0
21 stars 4 forks source link

fix example #8

Open flatsiedatsie opened 3 years ago

flatsiedatsie commented 3 years ago

Coincidentally, running the example on the WebThings Gateway 1.0.0 image gives this result:

pi@gateway:~ $ uvicorn test_light:app --reload
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
INFO:     Started reloader process [2893] using watchgod
Process SpawnProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/uvicorn/subprocess.py", line 61, in subprocess_started
    target(sockets=sockets)
  File "/home/pi/.local/lib/python3.7/site-packages/uvicorn/server.py", line 49, in run
    loop.run_until_complete(self.serve(sockets=sockets))
  File "uvloop/loop.pyx", line 1494, in uvloop.loop.Loop.run_until_complete
  File "/home/pi/.local/lib/python3.7/site-packages/uvicorn/server.py", line 56, in serve
    config.load()
  File "/home/pi/.local/lib/python3.7/site-packages/uvicorn/config.py", line 308, in load
    self.loaded_app = import_from_string(self.app)
  File "/home/pi/.local/lib/python3.7/site-packages/uvicorn/importer.py", line 23, in import_from_string
    raise exc from None
  File "/home/pi/.local/lib/python3.7/site-packages/uvicorn/importer.py", line 20, in import_from_string
    module = importlib.import_module(module_str)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "./test_light.py", line 1, in <module>
    from ..thingtalk import Value, Thing, Property, Event, Action
ImportError: attempted relative import with no known parent package
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
error walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
^Cerror walking file system: FileNotFoundError [Errno 2] No such file or directory: '/home/pi/.config/pulse/fca32b4ba11e46c0be68c37b23540300-runtime'
hidaris commented 3 years ago

@flatsiedatsie Thanks, I will look at what causes this weekend