We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello.
It should be specified the minimum required python version in setup.py. If not, python would raise TypeError like below.
setup.py
TypeError
# error in Python 3.8 File "/home/user/miniconda3/envs/aura_sr/lib/python3.8/site-packages/aura_sr.py", line 772, in AuraSR def __init__(self, config: dict[str, Any], device: str = "cuda"): TypeError: 'type' object is not subscriptable
Because the new type annotation dict[str, Any] was introduced in Python 3.9.
dict[str, Any]
So, there are two options. First, you specify argument python_requires in setup func in setup.py.
python_requires
setup
# setup.py from setuptools import setup setup( name="aura-sr", ...., # same as it is python_requires='>=3.9' )
Second, modify __init__ method of class AuraSR in aura_sr.py for backward comparability with older than Python 3.9
__init__
AuraSR
aura_sr.py
# aura_sr.py from typing import Dict, Any ... # existing code class AuraSR: def __init__(self, config: Dict[str, Any], device: str = "cuda"): self.upsampler = UnetUpsampler(**config).to(device) self.input_image_size = config["input_image_size"] ... # existing code
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello.
It should be specified the minimum required python version in
setup.py
.If not, python would raise
TypeError
like below.Because the new type annotation
dict[str, Any]
was introduced in Python 3.9.So, there are two options.
First, you specify argument
python_requires
insetup
func insetup.py
.Second, modify
__init__
method of classAuraSR
inaura_sr.py
for backward comparability with older than Python 3.9The text was updated successfully, but these errors were encountered: