AttributeError: 'NoneType' object has no attribute 'tell'
See original GitHub issueI’m using 4.0.1 version.
Exceptions are raised from elasticapm.transport.base.queued_data_size
Here is last trace.
if f:
# return size of the underlying BytesIO object if it is compressed
return f.fileobj.tell() if hasattr(f, "fileobj") else f.tell()
return 0
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Why do I get AttributeError: 'NoneType' object has no attribute ...
It means the object you are trying to access None . None is a Null variable ...
Read more >AttributeError: 'NoneType' object has no attribute 'tell' - Streamlit
AttributeError means that there was an Error that had to do with an Attribute request. In general, when you write x.y, y is...
Read more >AttributeError: 'NoneType' object has no attribute 'X' | bobbyhadz
The Python "AttributeError: 'NoneType' object has no attribute" occurs when we try to access an attribute on a None value, e.g. assignment from...
Read more >[FIXED] AttributeError: 'NoneType' object has no attribute ...
Hence, AttributeError: 'NoneType' object has no attribute 'something' error occurs when the type of object you are referencing is None.
Read more >Why do I get AttributeError: 'NoneType' object has ... - Intellipaat
You are getting AttributeError: 'NoneType' object has no attribute 'something' because NoneType means that instead of an instance of whatever Class or ...
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 FreeTop 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
Top GitHub Comments
@rafaelsierra can you open a new issue with this? As far as I can tell, this seems unrelated.
GzipFile.fileobj will be set to None when the GzipFile is closed, which is done by Transport.flush. I suspect that the flush timer thread is kicking in between
self.queued_data.write
andqueue_size = self.queued_data_size
insideTransport.queue
.I think if you move
queue_size = self.queued_data_size
up inside thewith self._queue_lock
this can be avoided. TheTransport.queue_data_size
property method should probably also account for fileobj possibly being None.