aio-libs / aiohttp-devtools

dev tools for aiohttp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reload stop working if there's a database file changed.

NewUserHa opened this issue · comments

[03:01:31] expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
  File "c:\program files\python37\lib\site-packages\aiohttp_devtools\runserver\watch.py", line 69, in _run
    await src_reload(self._app, changes.pop()[1])
  File "c:\program files\python37\lib\site-packages\aiohttp_devtools\runserver\serve.py", line 161, in src_reload
    path = str(Path(app['static_url']) / Path(path).relative_to(app['static_path']))
  File "c:\program files\python37\lib\pathlib.py", line 866, in relative_to
    to_drv, to_root, to_parts = self._parse_args(other)
  File "c:\program files\python37\lib\pathlib.py", line 642, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
ERROR:adev.server.dft:expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
  File "c:\program files\python37\lib\site-packages\aiohttp_devtools\runserver\watch.py", line 69, in _run
    await src_reload(self._app, changes.pop()[1])
  File "c:\program files\python37\lib\site-packages\aiohttp_devtools\runserver\serve.py", line 161, in src_reload
    path = str(Path(app['static_url']) / Path(path).relative_to(app['static_path']))
  File "c:\program files\python37\lib\pathlib.py", line 866, in relative_to
    to_drv, to_root, to_parts = self._parse_args(other)
  File "c:\program files\python37\lib\pathlib.py", line 642, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
changes in watch.py =  {(<Change.modified: 2>, 'C:\\Users\\a\\Desktop\\a.db')}
path in pathlib= C:\Users\a\Desktop\a.db

also, is there an option to disable DEBUG info of devtools itself? since it's debugging the user code instead of devtools itself.

I don't run windows I can't help myself, but will accept a PR if you can fix this.

I don't see how that part works. why did it match the db file instead py file and py file even not appear in that tuple.