Skip to content

AttributeError in deprecated_renderers_settings fonction #1175

Closed

Description

@quentinpraz

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

Activity

  1. added this to the 0.8.1 milestone on Jul 31, 2018
  2. added a commit that references this issue on Mar 24, 2024
    0df8e7c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions