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: 'Config' object has no attribute 'from_json' #314

Closed
khteh opened this issue Jan 6, 2024 · 1 comment
Closed

AttributeError: 'Config' object has no attribute 'from_json' #314

khteh opened this issue Jan 6, 2024 · 1 comment

Comments

@khteh
Copy link

khteh commented Jan 6, 2024

import quart_flask_patch, json, logging, os
from quart import Quart, request
    app = Quart(__name__, template_folder='view/templates', static_url_path='', static_folder='view/static')
    app.config.from_json("/etc/pythonrestapi_config.json", "r")

Environment:

  • Python version: 3.11.6
  • Quart version: 0.19.4
@pgjones
Copy link
Member

pgjones commented Jan 23, 2024

from_json was deprecated a while back, use from_file("/etc/pythonrestapi_config.json", json.load) instead

@pgjones pgjones closed this as completed Jan 23, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants