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: '_Union' object has no attribute '__qualname__'

See original GitHub issue
Steps to reproduce the problem:
  1. pip3 install mitmproxy
  2. mitmproxy
  3. Crash (see below)
Any other comments? What have you tried so far?
$ mitmdump
Traceback (most recent call last):
  File "/usr/local/bin/mitmdump", line 11, in <module>
    sys.exit(mitmdump())
  File "/usr/local/lib/python3.6/site-packages/mitmproxy/tools/main.py", line 106, in mitmdump
    dump_options = options.Options()
  File "/usr/local/lib/python3.6/site-packages/mitmproxy/options.py", line 123, in __init__
    self.rfile = rfile
  File "/usr/local/lib/python3.6/site-packages/mitmproxy/optmanager.py", line 111, in __setattr__
    self._typecheck(attr, value)
  File "/usr/local/lib/python3.6/site-packages/mitmproxy/optmanager.py", line 122, in _typecheck
    typecheck.check_type(attr, value, expected_type)
  File "/usr/local/lib/python3.6/site-packages/mitmproxy/utils/typecheck.py", line 24, in check_type
    if typeinfo.__qualname__ == "Union":
AttributeError: '_Union' object has no attribute '__qualname__'
System information

mitmproxy 1.0.0 Python 3.6.0 OS X 10.11.6

(mitmproxy --sysinfo gives the same traceback above)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Kriechicommented, Dec 26, 2016

We have a rough fix in #1884 - will be merged soon!

0reactions
mhilscommented, Dec 27, 2016

We just pushed 1.0.1 which fixes compatibility with Python 3.6. Thanks again for reporting this! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue 44524: __name__ attribute in typing module
I noticed some (perhaps intentional) oddities with the __name__ attribute: - typing classes like Any (subclass of _SpecialForm) do not have ...
Read more >
python - __name__ and __qualname__ missing in object
The class keyword sets this variable, it is not a function and won't be set ... Qualname. A module object also has a...
Read more >
sphinx.ext.autodoc
Its *objtype* attribute selects what auto directive it is assigned to (the directive name is ... Should return None if the object does...
Read more >
Source code for torch_geometric.data.dataset
__name__}' object has no " f"attribute 'num_node_features'") @property def ... return data.num_edge_features raise AttributeError(f"'{data.__class__.
Read more >
29.12. inspect — Inspect live objects - Python 3.7 ...
getmembers() will only return class attributes defined in the metaclass ... An object passing this test has a __get__() method but not a ......
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