Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: required field "type_ignores" missing from Module in Python 3.8 #1331

Closed
riverhsu opened this issue Nov 28, 2019 · 9 comments
Closed

Comments

@riverhsu
Copy link

This issue tracker is a tool to address bugs in Eve itself.
Please use Stack Overflow for general questions about using Eve or issues not
related to Eve (see http://python-eve.org/support).

If you'd like to report a bug in Eve, fill out the template below. Provide
any any extra information that may be useful / related to your problem.
Ideally, create an MCVE, which helps us
understand the problem and helps check that it is not caused by something in
your code.


Expected Behavior

Tell us what should happen.

from eve import Eve
app = Eve()
if __name__ == '__main__':
    app.run()

Actual Behavior

Tell us what happens instead.

Traceback (most recent call last):
  File "eve01.py", line 5, in <module>
    app = Eve()
  File "/home/riverhsu/.local/share/virtualenvs/API-XnJK2rAX/lib/python3.8/site-packages/eve/flaskapp.py", line 152, in __init__
    super(Eve, self).__init__(import_name, **kwargs)
  File "/home/riverhsu/.local/share/virtualenvs/API-XnJK2rAX/lib/python3.8/site-packages/flask/app.py", line 601, in __init__
    self.add_url_rule(
  File "/home/riverhsu/.local/share/virtualenvs/API-XnJK2rAX/lib/python3.8/site-packages/flask/app.py", line 98, in wrapper_func
    return f(self, *args, **kwargs)
  File "/home/riverhsu/.local/share/virtualenvs/API-XnJK2rAX/lib/python3.8/site-packages/flask/app.py", line 1277, in add_url_rule
    self.url_map.add(rule)
  File "/home/riverhsu/.local/share/virtualenvs/API-XnJK2rAX/lib/python3.8/site-packages/werkzeug/routing.py", line 1388, in add
    rule.bind(self)
  File "/home/riverhsu/.local/share/virtualenvs/API-XnJK2rAX/lib/python3.8/site-packages/werkzeug/routing.py", line 730, in bind
    self.compile()
  File "/home/riverhsu/.local/share/virtualenvs/API-XnJK2rAX/lib/python3.8/site-packages/werkzeug/routing.py", line 794, in compile
    self._build = self._compile_builder(False).__get__(self, None)
  File "/home/riverhsu/.local/share/virtualenvs/API-XnJK2rAX/lib/python3.8/site-packages/werkzeug/routing.py", line 951, in _compile_builder
    code = compile(module, "<werkzeug routing>", "exec")
TypeError: required field "type_ignores" missing from Module

Environment

OS: ubuntu 18.04

  • Python version: 3.8
  • Eve version: 0.9.2
@nicolaiarocci
Copy link
Member

Hi, thanks for the report. This is already fixed on the dev branch, see #1325.

@nicolaiarocci
Copy link
Member

PS: while we wait for the next eve release, you could try to fix by backporting werkzeug to <0.15.4
The issue only surfaces with Python 3,8 and werkzeug >=0.15.4.

@delcimetro
Copy link

PS: while we wait for the next eve release, you could try to fix by backporting werkzeug to <0.15.4
The issue only surfaces with Python 3,8 and werkzeug >=0.15.4.

Just to say i found the same error with Werkzeug==0.15.3

@henrique-a
Copy link

PS: while we wait for the next eve release, you could try to fix by backporting werkzeug to <0.15.4
The issue only surfaces with Python 3,8 and werkzeug >=0.15.4.

Just to say i found the same error with Werkzeug==0.15.3

Same with Werkzeug==0.15.2

@SKAUL05
Copy link

SKAUL05 commented Jun 16, 2020

PS: while we wait for the next eve release, you could try to fix by backporting werkzeug to <0.15.4
The issue only surfaces with Python 3,8 and werkzeug >=0.15.4.

Just to say i found the same error with Werkzeug==0.15.3

Any solution found? I'm facing the same problem

@nicolaiarocci
Copy link
Member

On which eve version are you on? This should be fixed since v1.0 which has been available for a while.

jessp01 pushed a commit to jessp01/webcasting-app-python that referenced this issue Jul 17, 2020
    - Add config.template.py
    - Set conversion profile in config.py rather than hard code it in create.py
    - Higher version of Werkzeug (see pyeve/eve#1331)
jessp01 pushed a commit to kaltura-vpaas/webcasting-app-python that referenced this issue Jul 17, 2020
- Add config.template.py
- Set conversion profile in config.py rather than hard code it in create.py
- Higher version of Werkzeug (see pyeve/eve#1331)
@MB23
Copy link

MB23 commented Nov 6, 2020

Hi, I am still seeing this error. I am on python 3.8 and eve 1.1.0. Backporting werkzeug did not help either.

@ferozkhan
Copy link

Hi,
using python 3.8.2 and still getting the error with:

>>> import werkzeug
>>> werkzeug.__version__
'1.0.0'
/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/codeop.py in __call__(self, source, filename, symbol)
    141 
    142     def __call__(self, source, filename, symbol):
--> 143         codeob = compile(source, filename, symbol, self.flags, 1)
    144         for feature in _features:
    145             if codeob.co_flags & feature.compiler_flag:

TypeError: required field "type_ignores" missing from Module```

@darkman66
Copy link

darkman66 commented Jan 22, 2021

i experienced exact same problem and... I do not use/have werkzeug in my virtualenv at all 😔

TypeError                                 Traceback (most recent call last)
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/codeop.py in __call__(self, source, filename, symbol)
    134
    135     def __call__(self, source, filename, symbol):
--> 136         codeob = compile(source, filename, symbol, self.flags, 1)
    137         for feature in _features:
    138             if codeob.co_flags & feature.compiler_flag:

and managed to solve it just reinstalled ipython (also as be precise prompt-toolkit which is being installed as part of it) pkg

Installing collected packages: prompt-toolkit, ipython
  Attempting uninstall: prompt-toolkit
    Found existing installation: prompt-toolkit 1.0.18
    Uninstalling prompt-toolkit-1.0.18:
      Successfully uninstalled prompt-toolkit-1.0.18
  Attempting uninstall: ipython
    Found existing installation: ipython 5.3.0
    Uninstalling ipython-5.3.0:
      Successfully uninstalled ipython-5.3.0

in my case 😊that's the magic which did the trick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants