Excessive amount of AssertionError: feed_data before feed_eof in the log
See original GitHub issueFirst check
- I added a descriptive title to this issue.
- I used the GitHub search to find a similar issue and didn’t find it.
- I searched the Prefect documentation for this issue.
- I checked that this issue is related to Prefect and not one of its dependencies.
Bug summary
Everything seems to be working fine, but when I looked in the orion.log file (SERVER_LEVEL:WARNING) I see the exception as below. Unfortunately I get the impression I can’t dynamically change the logging level using SIGHUP/re-read configuration so I can’t add any more context and I don’t want to stop the Orion server etc.
If I could get some background info on why this might be happening over and over, I can debug it further. Perhaps my code is doing something incorrectly?
Reproduction
Need more info before I can provide code
Error
17:35:38.216 | ERROR | asyncio - Exception in callback SubprocessStreamProtocol.pipe_data_received(1, b'INFO: 1...1.1" 200 OK\n')
handle: <Handle SubprocessStreamProtocol.pipe_data_received(1, b'INFO: 1...1.1" 200 OK\n')>
Traceback (most recent call last):
File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "/usr/lib/python3.8/asyncio/subprocess.py", line 73, in pipe_data_received
reader.feed_data(data)
File "/usr/lib/python3.8/asyncio/streams.py", line 472, in feed_data
assert not self._eof, 'feed_data after feed_eof'
AssertionError: feed_data after feed_eof
Versions
Version: 2.0.3
API version: 0.8.0
Python version: 3.8.10
Git commit: 2f1cf4ac
Built: Fri, Aug 5, 2022 3:57 PM
OS/Arch: linux/x86_64
Profile: default
Server type: hosted
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:17 (1 by maintainers)
Top Results From Across the Web
python - Why does this AssertionError exception not continue
The AssertionError occured in the source.read(TagName) call. you need to wrap this with your try except block: while True: try: for message ...
Read more >Python | Assertion Error - GeeksforGeeks
Assertion is a programming concept used while writing a code where the user declares a condition to be true using assert statement prior...
Read more >Assertion error when you run internal query in batch mode for ...
Assume that you have full-text index on a computed large object (LOB) column for a table in SQL Server 2019. When batch mode...
Read more >Assertion Error with arcpy.mapping.UpdateLayer
The problem is in the arcpy.mapping.UpdateLayer(df, updateLyr, sourceLayer, True) part. Your variable updateLyr is a python list.
Read more >Python's assert: Debug and Test Your Code Like a Pro
The Syntax of the assert Statement; The AssertionError Exception ... Programmers also place assertions before functions' return values to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Leaving a comment here for any unfortunate soul who runs into the same issue as me.
I was seeing this
AssertionError: feed_data after feed_eoferror, as the reporter described, though neither the linked PR or https://github.com/PrefectHQ/prefect/issues/6446 fixed my error.I was running prefect in a django command (which i do not recommend unless you have to), and this command was running in a container. I was seeing this error, and eventually discovered that the output stream was being wrapped by
colorama.ansitowin32.StreamWrapper, but only when the container was not attached to a tty.I found out django was initializing colorama for me, and the behavior from Django only makes this an issue when not attached to a tty, and uninstalling colorama fixed the issue.
I believe the
PYTHONUTF8=1setting will not reproduce the EOF assertion error but the issue in #6446.