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

AttributeError in deprecated_renderers_settings fonction #1175

Closed
quentinpraz opened this issue Jul 25, 2018 · 0 comments
Closed

AttributeError in deprecated_renderers_settings fonction #1175

quentinpraz opened this issue Jul 25, 2018 · 0 comments
Labels
Milestone

Comments

@quentinpraz
Copy link

quentinpraz commented Jul 25, 2018

Actual Behavior

During the initialization of the flask API, an error is raised in deprecated_renderers_settings() function.
The error is the following:

  File "/run.py", line 2, in <module>
    app = Eve()
  File "/usr/lib/python2.7/site-packages/eve/flaskapp.py", line 141, in __init__
    self.load_config()
  File "/usr/lib/python2.7/site-packages/eve/flaskapp.py", line 266, in load_config
    self.check_deprecated_features()
  File "/usr/lib/python2.7/site-packages/eve/flaskapp.py", line 292, in check_deprecated_features
    deprecated_renderers_settings()
  File "/usr/lib/python2.7/site-packages/eve/flaskapp.py", line 280, in deprecated_renderers_settings
    self.config['RENDERERS'] = default_settings.RENDERERS.copy()
AttributeError: 'list' object has no attribute 'copy'

This is probably du to the copy() function that was introduced in python 3.3.
Solution would be to replace default_settings.RENDERERS.copy() by list(default_settings.RENDERERS) or default_settings.RENDERERS[:]

Environment

  • Python version: 2.7.15
  • Eve version: 0.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants