question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'NoneType' object has no attribute 'tell'

See original GitHub issue

I’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
screen shot 2018-11-28 at 12 23 39 pm screen shot 2018-11-28 at 12 24 41 pm

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
beniwohlicommented, Mar 21, 2019

@rafaelsierra can you open a new issue with this? As far as I can tell, this seems unrelated.

1reaction
axwcommented, Dec 4, 2018

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 and queue_size = self.queued_data_size inside Transport.queue.

I think if you move queue_size = self.queued_data_size up inside the with self._queue_lock this can be avoided. The Transport.queue_data_size property method should probably also account for fileobj possibly being None.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found