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

Comments

Projects
None yet
2 participants
@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

@nicolaiarocci nicolaiarocci added this to the 0.8.1 milestone Jul 31, 2018

@nicolaiarocci nicolaiarocci added the bug label Jul 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.