clear-init does not work
Kracozebr opened this issue · comments
Describe the bug
Can not run clearml-init command
To reproduce
I installed the clearml
pip install clearml
After that I run
clearml-init
And get the following error:
Traceback (most recent call last):
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/bin/clearml-init", line 5, in <module>
from clearml.cli.config.__main__ import main
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/clearml/__init__.py", line 5, in <module>
from .task import Task
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/clearml/task.py", line 42, in <module>
from .backend_api.services import tasks, projects, events
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/clearml/backend_api/__init__.py", line 1, in <module>
from .session import Session, CallResult, TimeoutExpiredError, ResultNotReadyError, browser_login
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/clearml/backend_api/session/__init__.py", line 1, in <module>
from .session import Session, browser_login
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/clearml/backend_api/session/session.py", line 37, in <module>
from .request import Request, BatchRequest # noqa: F401
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/clearml/backend_api/session/request.py", line 9, in <module>
from referencing.exceptions import Unresolvable
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/referencing/__init__.py", line 4, in <module>
from referencing._core import Anchor, Registry, Resource, Specification
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/referencing/_core.py", line 29, in <module>
class Specification(Generic[D]):
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/referencing/_core.py", line 55, in Specification
] = field(alias="anchors_in")
TypeError: field() got an unexpected keyword argument 'alias'
This error occurs when python version 3.8 is used when python 3.10 is used the issue does not occur
Expected behaviour
What is the expected behaviour? What should've happened but didn't?
Environment
- Server type self hosted
- ClearML SDK Version 1.13.2
- ClearML Server Version (Only for self hosted). WebApp: 1.12.1-397 • Server: 1.12.1-397 • API: 2.26
- Python Version 3.8
- OS (Windows \ Linux \ Macos) Ubuntu 22.04
Related Discussion
If this continues a slack thread, please provide a link to the original slack thread.
Hi @Kracozebr, this looks like a pip installation error. It seems clearml
requires attr>=18.0
and referencing
requires attrs>=22.2.0
, but I assume somehow pip did not resolve that correctly and left an older version of attrs:
- Can you share the console output of
pip show attrs
? - Also, can you try to reinstall
pip install -U clearml
and share the complete console output of that command?
Here is the output pip show attrs
:
Name: attrs
Version: 23.1.0
Summary: Classes Without Boilerplate
Home-page:
Author:
Author-email: Hynek Schlawack <hs@ox.cx>
License:
Location: /home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages
Requires:
Required-by: clearml, jsonschema, mediapipe, referencing
Output of pip install -U clearml
:
Requirement already satisfied: clearml in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (1.13.2)
Requirement already satisfied: psutil>=3.4.2 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (5.9.5)
Requirement already satisfied: python-dateutil>=2.6.1 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (2.8.2)
Requirement already satisfied: attrs>=18.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (23.1.0)
Requirement already satisfied: furl>=2.0.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (2.1.3)
Requirement already satisfied: pathlib2>=2.3.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (2.3.7.post1)
Requirement already satisfied: pyparsing>=2.0.3 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (3.0.9)
Requirement already satisfied: referencing<0.40 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (0.31.0)
Requirement already satisfied: numpy>=1.10 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (1.24.3)
Requirement already satisfied: PyYAML>=3.12 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (6.0.1)
Requirement already satisfied: Pillow>=4.1.1 in /homeminiconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (9.4.0)
Requirement already satisfied: urllib3>=1.21.1 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (1.26.15)
Requirement already satisfied: six>=1.13.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (1.16.0)
Requirement already satisfied: pyjwt<2.9.0,>=2.4.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (2.8.0)
Requirement already satisfied: jsonschema>=2.6.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (4.16.0)
Requirement already satisfied: requests>=2.20.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from clearml) (2.28.2)
Requirement already satisfied: orderedmultidict>=1.0.1 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from furl>=2.0.0->clearml) (1.0.1)
Requirement already satisfied: pkgutil-resolve-name>=1.3.10 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from jsonschema>=2.6.0->clearml) (1.3.10)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from jsonschema>=2.6.0->clearml) (0.18.0)
Requirement already satisfied: importlib-resources>=1.4.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from jsonschema>=2.6.0->clearml) (5.12.0)
Requirement already satisfied: rpds-py>=0.7.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from referencing<0.40->clearml) (0.12.0)
Requirement already satisfied: idna<4,>=2.5 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from requests>=2.20.0->clearml) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from requests>=2.20.0->clearml) (2023.5.7)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from requests>=2.20.0->clearml) (3.1.0)
Requirement already satisfied: zipp>=3.1.0 in /home/miniconda3/envs/antispooth/lib/python3.8/site-packages (from importlib-resources>=1.4.0->jsonschema>=2.6.0->clearml) (3.15.0)
the error does not disappear
I have the exact same referencing and attrs versions, and I don't get this error, strange...
Can you try opening a python console and running this?
from referencing.exceptions import Unresolvable
Also, I assume you're using Python 3.8? I'm using the same
BTW, what is your exact python version? I'm using 3.8.15
I'm using Python 3.8.16,
I have the following error for running from referencing.exceptions import Unresolvable
:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/referencing/__init__.py", line 4, in <module>
from referencing._core import Anchor, Registry, Resource, Specification
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/referencing/_core.py", line 29, in <module>
class Specification(Generic[D]):
File "/home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/referencing/_core.py", line 55, in Specification
] = field(alias="anchors_in")
TypeError: field() got an unexpected keyword argument 'alias'
And if you run:
from attrs import __version__
print(__version__)
22.1.0
That's so strange, in 22.1.0 this argument exists for the field
type... Can you check the file /home/e.gavrilov@msk.unicum.ru/miniconda3/envs/antispooth/lib/python3.8/site-packages/attr/__init__.pyi
in line 322? Or fine the def field
definition there?
So it seems there are some overrides in attrs that do not allow the alias
arg, this might be a dependency issue with referencing
... Can you try upgrading attrs
to v22.2.0?
Thanks, it works now, with version 22.2.0
Thanks for confirming. I'll open an issue in the referencing
GitHub issues page on this.