Skip to content

python TypeError #3

@LeeKiYoung

Description

@LeeKiYoung
Traceback (most recent call last):
  File "/Users/leekiyoung/.local/bin/perplexity", line 56, in <module>
    class ApiConfig:
  File "/Users/leekiyoung/.local/bin/perplexity", line 58, in ApiConfig
    api_key: str | None = None
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

This occurs when using the new type hint (union type) syntax like str | None in Python 3.10 or earlier.
This syntax (str | None) is only supported in Python 3.10 or later.

It is python3.6+ as written in readme.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions