runserver is not stable with 0.5.0
Opened this issue · 4 comments
I switched to 0.5.0 and in my daily work I see simple changes in the markdown trigger issues that the type is not found anymore for a page.
For example the simple addition of an image include triggered this:
[I 240222 09:01:28 handlers:92] Reload 2 waiters: content/coaching/example.md
Parsing TOML failed: Duplicate keys! (line 4 column 1 char 140)
Gathered 37 tasks
Task exception was never retrieved
future: <Task finished name='Task-176' coro=<build_development() done, defined at /Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/blurry/__init__.py:229> exception=ValueError('Required @type value missing in file or TOML front matter invalid: coaching/example.md')>
Traceback (most recent call last):
File "/Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/blurry/__init__.py", line 230, in build_development
await build(release=False)
File "/Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/blurry/__init__.py", line 219, in build
await asyncio.gather(*markdown_tasks)
File "/Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/blurry/__init__.py", line 109, in write_html_file
raise ValueError(
ValueError: Required @type value missing in file or TOML front matter invalid: coaching/example.md
/Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py:1881: RuntimeWarning: coroutine 'write_sitemap_file' was never awaited
handle = self._ready.popleft()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py:1881: RuntimeWarning: coroutine 'process_non_markdown_file' was never awaited
handle = self._ready.popleft()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
I see this also with other changes in the text.
A restart of the blurry runserver
calms the issue again until the next time.
This is quite a severe impairment of the live server feature.
I also just saw this behavior, when simply replacing two sentences with a slightly different version. (Copy paste form another app)
[I 240222 10:00:01 handlers:135] Browser Connected: http://localhost:8000/coaching/example/
[E 240222 10:00:02 web:1875] Uncaught exception GET /assets/images/foo-20240222.png (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8000', method='GET', uri='/assets/images/foo-20240222.png', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tornado/web.py", line 1790, in _execute
result = await result
File "/Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tornado/web.py", line 2760, in get
await self.flush()
File "/Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tornado/web.py", line 1183, in flush
return self.request.connection.write(chunk)
File "/Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tornado/http1connection.py", line 502, in write
self._pending_write = self.stream.write(self._format_chunk(chunk))
File "/Users/okandler/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tornado/http1connection.py", line 478, in _format_chunk
raise httputil.HTTPOutputError(
tornado.httputil.HTTPOutputError: Tried to write more data than Content-Length
[E 240222 10:00:02 web:1278] Cannot send error response after headers written
[I 240222 10:00:02 handlers:135] Browser Connected: http://localhost:8000/coaching/#fn-2
Hmm! That does look bothersome. I'm not able to reproduce that issue on my machine by running blurry runserver
and making changes to Markdown or template files. What OS are you using? I'm using Python 3.11, which is one difference
I'm on a MacBook M1. I'll see if a python 3.11 makes it go away.