Skip to content

TypeError: 'NoneType' object is not subscriptable (Python 3.11) #167

Description

@antoinemacia

Another issue this one related to running this client SDK on Python 3.11 (on the back of updating to avoid this error #166)

Traceback (most recent call last):
  File "/opt/venv/lib/python3.11/site-packages/flagsmith/flagsmith.py", line 302, in update_environment
    self._evaluation_context = map_environment_document_to_context(
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/flagsmith/mappers.py", line 116, in map_environment_document_to_context
    "features": {
                ^
  File "/opt/venv/lib/python3.11/site-packages/flagsmith/mappers.py", line 116, in <dictcomp>
    "features": {
                ^
  File "/opt/venv/lib/python3.11/site-packages/flagsmith/mappers.py", line 271, in _map_environment_document_feature_states_to_feature_contexts
    feature_context["priority"] = feature_state["feature_segment"]["priority"]
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions