You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot access GRPC_FRAMEWORK user settings properly (might be a bug in line 97 of your setting.py module):
I specified some user settings in my django settings file:
settings.py GRPC_FRAMEWORK = { # 'ROOT_HANDLERS_HOOK': 'handlers.grpc_handlers', 'GRPC_HANDLERS': [] }
but when I try to retrieve the user settings: from django_grpc_framework.settings import grpc_settings print(grpc_settings.GRPC_HANDLERS)
I get the expected error: print(grpc_settings.GRPC_HANDLERS) File "/home/mark/py3venv/lara10/lib/python3.9/site-packages/django_grpc_framework/settings.py", line 93, in __getattr__ raise AttributeError("Invalid gRPC setting: '%s'" % attr) AttributeError: Invalid gRPC setting: 'GRPC_HANDLERS'
but it will not search in the self._user_settings
I think, there is an underscore missing in line 97 of django_grpc_framework/settings.py:
It should probably read: try: # Check if present in user settings **val = self._user_settings[attr]**
I would be happy, if you could resolve the bug soon - or update the documentation on the correct way of adding user settings.
Thanks a lot !
The text was updated successfully, but these errors were encountered:
I cannot access GRPC_FRAMEWORK user settings properly (might be a bug in line 97 of your setting.py module):
I specified some user settings in my django settings file:
settings.py
GRPC_FRAMEWORK = { # 'ROOT_HANDLERS_HOOK': 'handlers.grpc_handlers', 'GRPC_HANDLERS': [] }
but when I try to retrieve the user settings:
from django_grpc_framework.settings import grpc_settings print(grpc_settings.GRPC_HANDLERS)
I get the expected error:
print(grpc_settings.GRPC_HANDLERS) File "/home/mark/py3venv/lara10/lib/python3.9/site-packages/django_grpc_framework/settings.py", line 93, in __getattr__ raise AttributeError("Invalid gRPC setting: '%s'" % attr) AttributeError: Invalid gRPC setting: 'GRPC_HANDLERS'
but it will not search in the self._user_settings
I think, there is an underscore missing in line 97 of django_grpc_framework/settings.py:
It should probably read:
try: # Check if present in user settings **val = self._user_settings[attr]**
I would be happy, if you could resolve the bug soon - or update the documentation on the correct way of adding user settings.
Thanks a lot !
The text was updated successfully, but these errors were encountered: