Skip to content

AttributeError: 'list' object has no attribute 'get' #2223

Closed
@creatorrr

Description

@creatorrr

Version

0.35.0

Description

Inside a python repl on a running pod, trying to create a cortex client throws an error. I know this is not a typical or expected usage of the sdk but thought I'd report it. If irrelevant, please close the issue.

Steps to reproduce

  1. kubectl exec ... bash into a running pod
  2. python
  3. >>> import cortex; cortex.client()

Stack traces

>>> import cortex
>>> cl = cortex.client()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/envs/env/lib/python3.6/site-packages/cortex/telemetry.py", line 106, in wrapper
    return func(*args, **kwargs)
  File "/opt/conda/envs/env/lib/python3.6/site-packages/cortex/__init__.py", line 38, in client
    if not environments.get("default_environment"):
AttributeError: 'list' object has no attribute 'get'

Additional context

(optional)

Suggested solution

Seems to be a problem in cortex/init.py#L38.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions