Skip to content
New issue

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

TIM setup voi epäonnistua Poetryn bugiin Python riippuvuuksia asennettaessa Windowsilla #3493

Closed
saviit opened this issue Oct 9, 2023 · 2 comments · Fixed by #3494
Closed
Labels
kehitystyö TIM-kehitystyö (kehitys, joka ei ole suoraan näkyvissä loppukäyttäjälle) ulkoinen Kortti liittyy kirjastoon tai ohjelmaan, joka ei ole TIMin kehittämä tai ylläpitämä windows Koskee Windows-käyttöjärjestelmää.

Comments

@saviit
Copy link
Contributor

saviit commented Oct 9, 2023

Poetryn bugi liittyen pakettien/riippuvuuksien asentamiseen (tai tarkemmin, aikaisemmin asennetun version poistamiseen). Ilmenee vain Windows-käyttöjärjestelmässä. Poetryn kehittäjät eivät ole saaneet korjattua tätä viimeisimmässäkään versiossa (1.6.1), ja olemassaolevien korttien kommenteista päätellen sen korjaaminen ei vaikuta olevan kehittäjille prioriteetti (kts. python-poetry/poetry#1031, python-poetry/poetry-core#460).

Loki:

$ ./tim --verbose setup
[DEBUG] cmd: docker --version
[DEBUG] cmd: docker compose version
[DEBUG] cmd: 'C:\Program Files\nodejs\npm.CMD' --version
--------------------
Which TIM run profile should be used?
Select one of the following based on your needs:

* prod: Run the TIM instance in production mode. All services will be installed and started.
* dev: Run TIM instance in local development mode. Allows you to develop TIM and related services.
* test: Run TIM in CI testing mode. Starts a minimal number of services to speed up testing.
--profile= dev
[INFO] Creating tim.conf
[INFO] Created tim.conf created. Check the config file for more options.
[INFO] Setting up the development environment
[DEBUG] cmd: python --version
[INFO] Creating Python virtual environment
[DEBUG] cmd: python -m venv .venv
[DEBUG] cmd: 'C:\Projects\Repos\tim-jyu\tim\.venv\Scripts\python' --version
[DEBUG] cmd: 'C:\Projects\Repos\tim-jyu\tim\.venv\Scripts\pip' --version
[INFO] Downloading Poetry
[DEBUG] cmd: 'C:\Projects\Repos\tim-jyu\tim\.venv\Scripts\pip' install --upgrade poetry==1.6.1
Collecting poetry==1.6.1
  Obtaining dependency information for poetry==1.6.1 from https://files.pythonhosted.org/packages/7d/25/f3bfda3c458d114005af99441d009936b85a34a730aeb9cf57fb2630d9f7/poetry-1.6.1-py3-none-any.whl.metadata
  Downloading poetry-1.6.1-py3-none-any.whl.metadata (6.8 kB)
Collecting build<0.11.0,>=0.10.0 (from poetry==1.6.1)
  Using cached build-0.10.0-py3-none-any.whl (17 kB)
Collecting cachecontrol[filecache]<0.14.0,>=0.13.0 (from poetry==1.6.1)
  Obtaining dependency information for cachecontrol[filecache]<0.14.0,>=0.13.0 from https://files.pythonhosted.org/packages/1d/e3/a22348e6226dcd585d5a4b5f0175b3a16dabfd3912cbeb02f321d00e56c7/cachecontrol-0.13.1-py3-none-any.whl.metadata
  Downloading cachecontrol-0.13.1-py3-none-any.whl.metadata (3.0 kB)
Collecting cleo<3.0.0,>=2.0.0 (from poetry==1.6.1)
  Using cached cleo-2.0.1-py3-none-any.whl (77 kB)
Collecting crashtest<0.5.0,>=0.4.1 (from poetry==1.6.1)
  Using cached crashtest-0.4.1-py3-none-any.whl (7.6 kB)
Collecting dulwich<0.22.0,>=0.21.2 (from poetry==1.6.1)
  Obtaining dependency information for dulwich<0.22.0,>=0.21.2 from https://files.pythonhosted.org/packages/59/f6/1c2491bc270d7b66157c1f13203d2325ba0a210cfd62f600fab2ed16f6f3/dulwich-0.21.6-cp311-cp311-win_amd64.whl.metadata
  Using cached dulwich-0.21.6-cp311-cp311-win_amd64.whl.metadata (4.4 kB)
Collecting installer<0.8.0,>=0.7.0 (from poetry==1.6.1)
  Using cached installer-0.7.0-py3-none-any.whl (453 kB)
Collecting jsonschema<4.18.0,>=4.10.0 (from poetry==1.6.1)
  Downloading jsonschema-4.17.3-py3-none-any.whl (90 kB)
     ---------------------------------------- 90.4/90.4 kB 1.7 MB/s eta 0:00:00
Collecting keyring<25.0.0,>=24.0.0 (from poetry==1.6.1)
  Obtaining dependency information for keyring<25.0.0,>=24.0.0 from https://files.pythonhosted.org/packages/0e/8f/5772801169cf62e8232721034f91f81e33b0cfa6e51d3bf6ff65c503af2a/keyring-24.2.0-py3-none-any.whl.metadata
  Downloading keyring-24.2.0-py3-none-any.whl.metadata (20 kB)
Collecting packaging>=20.4 (from poetry==1.6.1)
  Obtaining dependency information for packaging>=20.4 from https://files.pythonhosted.org/packages/ec/1a/610693ac4ee14fcdf2d9bf3c493370e4f2ef7ae2e19217d7a237ff42367d/packaging-23.2-py3-none-any.whl.metadata
  Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
Collecting pexpect<5.0.0,>=4.7.0 (from poetry==1.6.1)
  Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting pkginfo<2.0.0,>=1.9.4 (from poetry==1.6.1)
  Using cached pkginfo-1.9.6-py3-none-any.whl (30 kB)
Collecting platformdirs<4.0.0,>=3.0.0 (from poetry==1.6.1)
  Obtaining dependency information for platformdirs<4.0.0,>=3.0.0 from https://files.pythonhosted.org/packages/56/29/3ec311dc18804409ecf0d2b09caa976f3ae6215559306b5b530004e11156/platformdirs-3.11.0-py3-none-any.whl.metadata
  Using cached platformdirs-3.11.0-py3-none-any.whl.metadata (11 kB)
Collecting poetry-core==1.7.0 (from poetry==1.6.1)
  Obtaining dependency information for poetry-core==1.7.0 from https://files.pythonhosted.org/packages/bf/d4/ce72ac247f414d15ff046f0926b76eb42bd743e83c1df28e856f328e3db1/poetry_core-1.7.0-py3-none-any.whl.metadata
  Downloading poetry_core-1.7.0-py3-none-any.whl.metadata (3.4 kB)
Collecting poetry-plugin-export<2.0.0,>=1.5.0 (from poetry==1.6.1)
  Obtaining dependency information for poetry-plugin-export<2.0.0,>=1.5.0 from https://files.pythonhosted.org/packages/e9/12/43553a79e1d3bf8de119125dfc3e1fcc8f4258d658b603908d02efaed256/poetry_plugin_export-1.5.0-py3-none-any.whl.metadata
  Using cached poetry_plugin_export-1.5.0-py3-none-any.whl.metadata (2.7 kB)
Collecting pyproject-hooks<2.0.0,>=1.0.0 (from poetry==1.6.1)
  Using cached pyproject_hooks-1.0.0-py3-none-any.whl (9.3 kB)
Collecting requests<3.0,>=2.26 (from poetry==1.6.1)
  Obtaining dependency information for requests<3.0,>=2.26 from https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl.metadata
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting requests-toolbelt<2,>=0.9.1 (from poetry==1.6.1)
  Using cached requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
Collecting shellingham<2.0,>=1.5 (from poetry==1.6.1)
  Obtaining dependency information for shellingham<2.0,>=1.5 from https://files.pythonhosted.org/packages/57/70/0265437683625b2e6491736706d3d679d90e2a26f6bff59f4e46e09872b9/shellingham-1.5.3-py2.py3-none-any.whl.metadata
  Using cached shellingham-1.5.3-py2.py3-none-any.whl.metadata (3.4 kB)
Collecting tomlkit<1.0.0,>=0.11.4 (from poetry==1.6.1)
  Obtaining dependency information for tomlkit<1.0.0,>=0.11.4 from https://files.pythonhosted.org/packages/a0/6d/808775ed618e51edaa7bbe6759e22e1c7eafe359af6e084700c6d39d3455/tomlkit-0.12.1-py3-none-any.whl.metadata
  Using cached tomlkit-0.12.1-py3-none-any.whl.metadata (2.7 kB)
Collecting trove-classifiers>=2022.5.19 (from poetry==1.6.1)
  Obtaining dependency information for trove-classifiers>=2022.5.19 from https://files.pythonhosted.org/packages/8b/65/af06975db29ea9407121b55964fb39c4e8365e65d01f8dbff29bcab02cc9/trove_classifiers-2023.9.19-py3-none-any.whl.metadata
  Using cached trove_classifiers-2023.9.19-py3-none-any.whl.metadata (2.2 kB)
Collecting virtualenv<21.0.0,>=20.22.0 (from poetry==1.6.1)
  Obtaining dependency information for virtualenv<21.0.0,>=20.22.0 from https://files.pythonhosted.org/packages/4e/8b/f0d3a468c0186c603217a6656ea4f49259630e8ed99558501d92f6ff7dc3/virtualenv-20.24.5-py3-none-any.whl.metadata
  Using cached virtualenv-20.24.5-py3-none-any.whl.metadata (4.5 kB)
Collecting colorama (from build<0.11.0,>=0.10.0->poetry==1.6.1)
  Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting msgpack>=0.5.2 (from cachecontrol[filecache]<0.14.0,>=0.13.0->poetry==1.6.1)
  Obtaining dependency information for msgpack>=0.5.2 from https://files.pythonhosted.org/packages/b4/3d/c8dd23050eefa3d9b9c5b8329ed3308c2f2f80f65825e9ea4b7fa621cdab/msgpack-1.0.7-cp311-cp311-win_amd64.whl.metadata
  Using cached msgpack-1.0.7-cp311-cp311-win_amd64.whl.metadata (9.4 kB)
Collecting filelock>=3.8.0 (from cachecontrol[filecache]<0.14.0,>=0.13.0->poetry==1.6.1)
  Obtaining dependency information for filelock>=3.8.0 from https://files.pythonhosted.org/packages/5e/5d/97afbafd9d584ff1b45fcb354a479a3609bd97f912f8f1f6c563cb1fae21/filelock-3.12.4-py3-none-any.whl.metadata
  Using cached filelock-3.12.4-py3-none-any.whl.metadata (2.8 kB)
Collecting rapidfuzz<3.0.0,>=2.2.0 (from cleo<3.0.0,>=2.0.0->poetry==1.6.1)
  Obtaining dependency information for rapidfuzz<3.0.0,>=2.2.0 from https://files.pythonhosted.org/packages/7f/e1/6010f99a87cb9ef9692200f5d3b590568c94a42ae2a475063fef94bdcb58/rapidfuzz-2.15.2-cp311-cp311-win_amd64.whl.metadata
  Using cached rapidfuzz-2.15.2-cp311-cp311-win_amd64.whl.metadata (9.2 kB)
Collecting urllib3>=1.25 (from dulwich<0.22.0,>=0.21.2->poetry==1.6.1)
  Obtaining dependency information for urllib3>=1.25 from https://files.pythonhosted.org/packages/26/40/9957270221b6d3e9a3b92fdfba80dd5c9661ff45a664b47edd5d00f707f5/urllib3-2.0.6-py3-none-any.whl.metadata
  Downloading urllib3-2.0.6-py3-none-any.whl.metadata (6.6 kB)
Collecting attrs>=17.4.0 (from jsonschema<4.18.0,>=4.10.0->poetry==1.6.1)
  Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 (from jsonschema<4.18.0,>=4.10.0->poetry==1.6.1)
  Downloading pyrsistent-0.19.3-cp311-cp311-win_amd64.whl (62 kB)
     ---------------------------------------- 62.7/62.7 kB ? eta 0:00:00
Collecting jaraco.classes (from keyring<25.0.0,>=24.0.0->poetry==1.6.1)
  Obtaining dependency information for jaraco.classes from https://files.pythonhosted.org/packages/c7/6b/1bc8fa93ea85146e08f0e0883bc579b7c7328364ed7df90b1628dcb36e10/jaraco.classes-3.3.0-py3-none-any.whl.metadata
  Using cached jaraco.classes-3.3.0-py3-none-any.whl.metadata (2.9 kB)
Collecting importlib-metadata>=4.11.4 (from keyring<25.0.0,>=24.0.0->poetry==1.6.1)
  Obtaining dependency information for importlib-metadata>=4.11.4 from https://files.pythonhosted.org/packages/cc/37/db7ba97e676af155f5fcb1a35466f446eadc9104e25b83366e8088c9c926/importlib_metadata-6.8.0-py3-none-any.whl.metadata
  Using cached importlib_metadata-6.8.0-py3-none-any.whl.metadata (5.1 kB)
Collecting pywin32-ctypes>=0.2.0 (from keyring<25.0.0,>=24.0.0->poetry==1.6.1)
  Obtaining dependency information for pywin32-ctypes>=0.2.0 from https://files.pythonhosted.org/packages/a4/bc/78b2c00cc64c31dbb3be42a0e8600bcebc123ad338c3b714754d668c7c2d/pywin32_ctypes-0.2.2-py3-none-any.whl.metadata
  Using cached pywin32_ctypes-0.2.2-py3-none-any.whl.metadata (3.8 kB)
Collecting ptyprocess>=0.5 (from pexpect<5.0.0,>=4.7.0->poetry==1.6.1)
  Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting charset-normalizer<4,>=2 (from requests<3.0,>=2.26->poetry==1.6.1)
  Obtaining dependency information for charset-normalizer<4,>=2 from https://files.pythonhosted.org/packages/92/5e/50028bbb269986d9bc30270cd46b47ea44a1ca0b3f8da3a8429680d37050/charset_normalizer-3.3.0-cp311-cp311-win_amd64.whl.metadata
  Using cached charset_normalizer-3.3.0-cp311-cp311-win_amd64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests<3.0,>=2.26->poetry==1.6.1)
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17 (from requests<3.0,>=2.26->poetry==1.6.1)
  Obtaining dependency information for certifi>=2017.4.17 from https://files.pythonhosted.org/packages/4c/dd/2234eab22353ffc7d94e8d13177aaa050113286e93e7b40eae01fbf7c3d9/certifi-2023.7.22-py3-none-any.whl.metadata
  Using cached certifi-2023.7.22-py3-none-any.whl.metadata (2.2 kB)
Collecting distlib<1,>=0.3.7 (from virtualenv<21.0.0,>=20.22.0->poetry==1.6.1)
  Obtaining dependency information for distlib<1,>=0.3.7 from https://files.pythonhosted.org/packages/43/a0/9ba967fdbd55293bacfc1507f58e316f740a3b231fc00e3d86dc39bc185a/distlib-0.3.7-py2.py3-none-any.whl.metadata
  Using cached distlib-0.3.7-py2.py3-none-any.whl.metadata (5.1 kB)
Collecting zipp>=0.5 (from importlib-metadata>=4.11.4->keyring<25.0.0,>=24.0.0->poetry==1.6.1)
  Obtaining dependency information for zipp>=0.5 from https://files.pythonhosted.org/packages/d9/66/48866fc6b158c81cc2bfecc04c480f105c6040e8b077bc54c634b4a67926/zipp-3.17.0-py3-none-any.whl.metadata
  Using cached zipp-3.17.0-py3-none-any.whl.metadata (3.7 kB)
Collecting more-itertools (from jaraco.classes->keyring<25.0.0,>=24.0.0->poetry==1.6.1)
  Obtaining dependency information for more-itertools from https://files.pythonhosted.org/packages/5a/cb/6dce742ea14e47d6f565589e859ad225f2a5de576d7696e0623b784e226b/more_itertools-10.1.0-py3-none-any.whl.metadata
  Using cached more_itertools-10.1.0-py3-none-any.whl.metadata (33 kB)
Downloading poetry-1.6.1-py3-none-any.whl (232 kB)
   ---------------------------------------- 232.8/232.8 kB 7.2 MB/s eta 0:00:00
Downloading poetry_core-1.7.0-py3-none-any.whl (426 kB)
   ---------------------------------------- 426.4/426.4 kB 6.7 MB/s eta 0:00:00
Using cached dulwich-0.21.6-cp311-cp311-win_amd64.whl (484 kB)
Downloading keyring-24.2.0-py3-none-any.whl (37 kB)
Using cached packaging-23.2-py3-none-any.whl (53 kB)
Using cached platformdirs-3.11.0-py3-none-any.whl (17 kB)
Using cached poetry_plugin_export-1.5.0-py3-none-any.whl (10 kB)
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Using cached shellingham-1.5.3-py2.py3-none-any.whl (9.7 kB)
Using cached tomlkit-0.12.1-py3-none-any.whl (37 kB)
Using cached trove_classifiers-2023.9.19-py3-none-any.whl (13 kB)
Using cached virtualenv-20.24.5-py3-none-any.whl (3.7 MB)
Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
Using cached charset_normalizer-3.3.0-cp311-cp311-win_amd64.whl (97 kB)
Using cached distlib-0.3.7-py2.py3-none-any.whl (468 kB)
Using cached filelock-3.12.4-py3-none-any.whl (11 kB)
Using cached importlib_metadata-6.8.0-py3-none-any.whl (22 kB)
Using cached msgpack-1.0.7-cp311-cp311-win_amd64.whl (222 kB)
Using cached pywin32_ctypes-0.2.2-py3-none-any.whl (30 kB)
Using cached rapidfuzz-2.15.2-cp311-cp311-win_amd64.whl (1.8 MB)
Downloading urllib3-2.0.6-py3-none-any.whl (123 kB)
   ---------------------------------------- 123.8/123.8 kB 7.1 MB/s eta 0:00:00
Downloading cachecontrol-0.13.1-py3-none-any.whl (22 kB)
Using cached jaraco.classes-3.3.0-py3-none-any.whl (5.9 kB)
Using cached zipp-3.17.0-py3-none-any.whl (7.4 kB)
Using cached more_itertools-10.1.0-py3-none-any.whl (55 kB)
Installing collected packages: trove-classifiers, ptyprocess, distlib, zipp, urllib3, tomlkit, shellingham, rapidfuzz, pywin32-ctypes, pyrsistent, pyproject-hooks, poetry-core, platformdirs, pkginfo, pexpect, packaging, msgpack, more-itertools, installer, idna, filelock, crashtest, colorama, charset-normalizer, certifi, attrs, virtualenv, requests, jsonschema, jaraco.classes, importlib-metadata, dulwich, cleo, build, requests-toolbelt, keyring, cachecontrol, poetry-plugin-export, poetry
Successfully installed attrs-23.1.0 build-0.10.0 cachecontrol-0.13.1 certifi-2023.7.22 charset-normalizer-3.3.0 cleo-2.0.1 colorama-0.4.6 crashtest-0.4.1 distlib-0.3.7 dulwich-0.21.6 filelock-3.12.4 idna-3.4 importlib-metadata-6.8.0 installer-0.7.0 jaraco.classes-3.3.0 jsonschema-4.17.3 keyring-24.2.0 more-itertools-10.1.0 msgpack-1.0.7 packaging-23.2 pexpect-4.8.0 pkginfo-1.9.6 platformdirs-3.11.0 poetry-1.6.1 poetry-core-1.7.0 poetry-plugin-export-1.5.0 ptyprocess-0.7.0 pyproject-hooks-1.0.0 pyrsistent-0.19.3 pywin32-ctypes-0.2.2 rapidfuzz-2.15.2 requests-2.31.0 requests-toolbelt-1.0.0 shellingham-1.5.3 tomlkit-0.12.1 trove-classifiers-2023.9.19 urllib3-2.0.6 virtualenv-20.24.5 zipp-3.17.0
[DEBUG] cmd: 'C:\Projects\Repos\tim-jyu\tim\.venv\Scripts\python' -m poetry --version
[INFO] Installing Python development dependencies
[DEBUG] cmd: 'C:\Projects\Repos\tim-jyu\tim\.venv\Scripts\python' -m poetry install --only=dev
Installing dependencies from lock file

Package operations: 41 installs, 3 updates, 0 removals

  ▒ Installing pycparser (2.21)
  ▒ Installing cffi (1.15.1)
  ▒ Installing frozenlist (1.4.0)
  ▒ Installing multidict (6.0.4)
  ▒ Installing aiosignal (1.3.1)
  ▒ Installing async-timeout (4.0.3)
  ▒ Downgrading charset-normalizer (3.3.0 -> 3.2.0): Failed

  CalledProcessError

  Command '['C:\\Projects\\Repos\\tim-jyu\\tim\\.venv\\Scripts\\python.exe', '-m', 'pip', 'uninstall', 'charset-normalizer', '-y']' returned non-zero exit status 2.

  at C:\Program Files\Python\Python 3.11\Lib\subprocess.py:571 in run
       567|             # We don't call process.wait() as .__exit__ does that for us.
       568|             raise
       569|         retcode = process.poll()
       570|         if check and retcode:
    >  571|             raise CalledProcessError(retcode, process.args,
       572|                                      output=stdout, stderr=stderr)
       573|     return CompletedProcess(process.args, retcode, stdout, stderr)
       574|
       575|

The following error occurred when trying to handle this error:


  EnvCommandError

  Command ['C:\\Projects\\Repos\\tim-jyu\\tim\\.venv\\Scripts\\python.exe', '-m', 'pip', 'uninstall', 'charset-normalizer', '-y'] errored with the following return code 2

  Output:
  Found existing installation: charset-normalizer 3.3.0
  Uninstalling charset-normalizer-3.3.0:
    Successfully uninstalled charset-normalizer-3.3.0
  ERROR: Exception:
  Traceback (most recent call last):
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_internal\cli\base_command.py", line 180, in exc_logging_wrapper
      status = run_func(*args)
               ^^^^^^^^^^^^^^^
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_internal\commands\uninstall.py", line 110, in run
      uninstall_pathset.commit()
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_internal\req\req_uninstall.py", line 432, in commit
      self._moved_paths.commit()
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_internal\req\req_uninstall.py", line 278, in commit
      save_dir.cleanup()
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_internal\utils\temp_dir.py", line 173, in cleanup
      rmtree(self._path)
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_vendor\tenacity\__init__.py", line 291, in wrapped_f
      return self(f, *args, **kw)
             ^^^^^^^^^^^^^^^^^^^^
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_vendor\tenacity\__init__.py", line 381, in __call__
      do = self.iter(retry_state=retry_state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_vendor\tenacity\__init__.py", line 327, in iter
      raise retry_exc.reraise()
            ^^^^^^^^^^^^^^^^^^^
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_vendor\tenacity\__init__.py", line 160, in reraise
      raise self.last_attempt.result()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\Python\Python 3.11\Lib\concurrent\futures\_base.py", line 449, in result
      return self.__get_result()
             ^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\Python\Python 3.11\Lib\concurrent\futures\_base.py", line 401, in __get_result
      raise self._exception
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_vendor\tenacity\__init__.py", line 384, in __call__
      result = fn(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^
    File "C:\Projects\Repos\tim-jyu\tim\.venv\Lib\site-packages\pip\_internal\utils\misc.py", line 130, in rmtree
      shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler)
    File "C:\Program Files\Python\Python 3.11\Lib\shutil.py", line 759, in rmtree
      return _rmtree_unsafe(path, onerror)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\Python\Python 3.11\Lib\shutil.py", line 622, in _rmtree_unsafe
      onerror(os.unlink, fullname, sys.exc_info())
    File "C:\Program Files\Python\Python 3.11\Lib\shutil.py", line 620, in _rmtree_unsafe
      os.unlink(fullname)
  PermissionError: [WinError 5] Access is denied: 'C:\\Projects\\Repos\\tim-jyu\\tim\\.venv\\Lib\\site-packages\\~harset_normalizer\\md.cp311-win_amd64.pyd'


  at .venv\Lib\site-packages\poetry\utils\env\base_env.py:363 in _run
      359|                 output = subprocess.check_output(
      360|                     cmd, stderr=stderr, env=env, text=True, **kwargs
      361|                 )
      362|         except CalledProcessError as e:
    > 363|             raise EnvCommandError(e, input=input_)
      364|
      365|         return output
      366|
      367|     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

  ▒ Installing cryptography (41.0.3)
  ▒ Installing markupsafe (2.1.3)
  ▒ Installing numpy (1.25.2)
  ▒ Installing yarl (1.9.2)
[DEBUG] Traceback (most recent call last):
  File "C:\Projects\Repos\tim-jyu\tim\cli\tim.py", line 90, in main
    args.run(args)
  File "C:\Projects\Repos\tim-jyu\tim\cli\commands\setup.py", line 524, in run
    setup_dev()
  File "C:\Projects\Repos\tim-jyu\tim\cli\commands\setup.py", line 361, in setup_dev
    run_cmd([*poetry, "install", "--only=dev"])
  File "C:\Projects\Repos\tim-jyu\tim\cli\util\proc.py", line 17, in run_cmd
    return subprocess.run(args, check=check, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python\Python 3.11\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Projects\\Repos\\tim-jyu\\tim\\.venv\\Scripts\\python', '-m', 'poetry', 'install', '--only=dev']' returned non-zero exit status 1.

[ERROR] Command '['C:\\Projects\\Repos\\tim-jyu\\tim\\.venv\\Scripts\\python', '-m', 'poetry', 'install', '--only=dev']' returned non-zero exit status 1.

Ongelmallinen paketti vaikuttaa olevan charset-normalizer, josta asennetaan ensin tuorein 3.3.0, mutta sitten downgradetaan 3.2.0:aan. Kuitenkaan pipdeptree ei löydä charset-normalizer-paketille sellaisia riippuvuuksia, joiden vuoksi tuota pakettia tarvitsisi downgradettaa (komento: pipdeptree --reverse --packages charset-normalizer). Eli tämänhetkisen ongelman voisi kaiketi kiertää pakottamalla charset-normalizer tuoreimpaan versioon. Mutta se ei toki auta tuohon Poetryn bugiin, mikäli se ilmenee myös muiden pakettien kanssa.

@saviit saviit added kehitystyö TIM-kehitystyö (kehitys, joka ei ole suoraan näkyvissä loppukäyttäjälle) ulkoinen Kortti liittyy kirjastoon tai ohjelmaan, joka ei ole TIMin kehittämä tai ylläpitämä windows Koskee Windows-käyttöjärjestelmää. labels Oct 9, 2023
@saviit
Copy link
Contributor Author

saviit commented Oct 10, 2023

Lisäämällä charset-normalizer = "^3.3.0" tiedostoon pyproject.toml pääsi eteenpäin ylempänä kuvatusta virheestä, mutta sitten asennus pysähtyy seuraavaan:

$ ./tim --verbose setup --profile dev --force
---SNIP---
Installing dependencies from lock file
No dependencies to install or update
[DEBUG] cmd: 'C:\Projects\Repos\tim-jyu\tim\.venv\bin\pip' --version
[DEBUG] cmd: 'C:\Projects\Repos\tim-jyu\tim\.venv\Scripts\pip.exe' --version
[INFO] Project workspace already exists, skipping copying template
[INFO] Docker: Pulling TIM images
[DEBUG] Failed to interpolate COMPOSE_PROJECT_NAME:?: invalid syntax (<string>, line 1)
[DEBUG] Failed to interpolate COMPOSE_PROFILES:?: invalid syntax (<string>, line 1)
[DEBUG] Failed to interpolate COMPOSE_PROJECT_NAME:?: invalid syntax (<string>, line 1)
[DEBUG] Failed to interpolate COMPOSE_PROJECT_NAME:?: invalid syntax (<string>, line 1)
[DEBUG] Failed to interpolate COMPOSE_PROFILES:?: invalid syntax (<string>, line 1)
[DEBUG] Failed to interpolate SKIP_JSRUNNER_START:-false: invalid syntax (<string>, line 1)
[DEBUG] Failed to interpolate COMPOSE_PROJECT_NAME:?: invalid syntax (<string>, line 1)
[DEBUG] Failed to interpolate COMPOSE_PROJECT_NAME:?: invalid syntax (<string>, line 1)
[DEBUG] Failed to interpolate COMPOSE_PROFILES:?: invalid syntax (<string>, line 1)
[DEBUG] Failed to interpolate CI:-false: invalid syntax (<string>, line 1)
[DEBUG] Failed to interpolate NEW_SCREENSHOTS:-0: invalid syntax (<string>, line 1)
[DEBUG] cmd: docker compose -f C:/Projects/Repos/tim-jyu/tim/docker-compose.yml pull
 tim Skipped - Image is already being pulled by drag
 oiko Pulling
 drag Pulling
 stack-api-server Pulling
 postgresql Pulling
 showfile Pulling
 tests Skipped - Image is already being pulled by drag
 celery Skipped - Image is already being pulled by drag
 pali Skipped - Image is already being pulled by drag
 fields Skipped - Image is already being pulled by drag
 csplugin Skipped - Image is already being pulled by showfile
 celery-beat Skipped - Image is already being pulled by drag
 timagent Skipped - Image is already being pulled by drag
 imagex Skipped - Image is already being pulled by showfile
 haskellplugins Pulling
 jsrunner Skipped - Image is already being pulled by drag
 feedback Skipped - Image is already being pulled by drag
 postgresql-test Skipped - Image is already being pulled by postgresql
 maxima Pulling
 mailman-test Pulling
 dumbo Pulling
 caddy Pulling
 redis Pulling
 339de151aab4 Pulling fs layer
 1bbb339ce14c Pulling fs layer
 4acd328861e7 Pulling fs layer
 0b7f932e0273 Pulling fs layer
 1f40d7304a0f Pulling fs layer
 40d9ef4ad8ff Pulling fs layer
 0b7f932e0273 Waiting
 40d9ef4ad8ff Waiting
 1f40d7304a0f Waiting
 f1e2f6dcec4d Pulling fs layer
 14f5437bd57f Pulling fs layer
 38ec624b6ce8 Pulling fs layer
 ad8d2e60a43a Pulling fs layer
 797a37e39398 Pulling fs layer
 347a88f8acd0 Pulling fs layer
 f1e2f6dcec4d Waiting
 646b81d330c9 Pulling fs layer
 14f5437bd57f Waiting
 ad8d2e60a43a Waiting
 38ec624b6ce8 Waiting
 f5dfcb7c0a7c Pulling fs layer
 797a37e39398 Waiting
 347a88f8acd0 Waiting
 f5dfcb7c0a7c Waiting
 646b81d330c9 Waiting
 d1669123f281 Pulling fs layer
 72469183f856 Pulling fs layer
 3f0f7cf8f712 Pulling fs layer
 e17f0e0aff09 Pulling fs layer
 cbb664864d89 Pulling fs layer
 d433c2919297 Pulling fs layer
 320e967589d9 Pulling fs layer
 0769775dd4bc Pulling fs layer
 1fcadb24b4c4 Pulling fs layer
 d1669123f281 Waiting
 72469183f856 Waiting
 0769775dd4bc Waiting
 320e967589d9 Waiting
 d433c2919297 Waiting
 3f0f7cf8f712 Waiting
 cbb664864d89 Waiting
 1fcadb24b4c4 Waiting
 e17f0e0aff09 Waiting
 drag Error
 postgresql Error
 caddy Error
 oiko Error
 redis Error
 showfile Error
 stack-api-server Error
 haskellplugins Error
Error response from daemon: manifest unknown
[DEBUG] Traceback (most recent call last):
  File "C:\Projects\Repos\tim-jyu\tim\cli\tim.py", line 90, in main
    args.run(args)
  File "C:\Projects\Repos\tim-jyu\tim\cli\commands\setup.py", line 531, in run
    run_compose(["pull", *dc_pull_args])
  File "C:\Projects\Repos\tim-jyu\tim\cli\docker\run.py", line 88, in run_compose
    return run_cmd(compose_args, env=env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Projects\Repos\tim-jyu\tim\cli\util\proc.py", line 17, in run_cmd
    return subprocess.run(args, check=check, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\saviit\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['docker', 'compose', '-f', 'C:/Projects/Repos/tim-jyu/tim/docker-compose.yml', 'pull']' returned non-zero exit status 18.

[ERROR] Command '['docker', 'compose', '-f', 'C:/Projects/Repos/tim-jyu/tim/docker-compose.yml', 'pull']' returned non-zero exit status 18.

Tuo ei ole vielä selvinnyt, miksi docker-compose valittaa syntaksivirheestä ympäristömuuttujien interpoloinnissa: syntaksi on kyllä ihan speksin mukainen. Varsinainen virhe (Error response from daemon: manifest unknown) taitaa googlettamisen perusteella olla, että docker-tageissa on vikaa -> docker-compose pull ei löydä imageja.

@dezhidki
Copy link
Member

Nuo

Failed to interpolate COMPOSE_PROJECT_NAME:?

Eivät haittaa, sillä ne tulevat docker-composen ympäristömuuttujista

Puolestaan

Error response from daemon: manifest unknown

Tarkoittaa, että imageja ei löydy. Se puolestaan johtuu siitä, että tim-kontin image pitää rakentaa uudestaan aina, kun lisää tai poistaa poetrylla pakkauksia.

Pistän kohta imagen rakentumaan timbetaan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kehitystyö TIM-kehitystyö (kehitys, joka ei ole suoraan näkyvissä loppukäyttäjälle) ulkoinen Kortti liittyy kirjastoon tai ohjelmaan, joka ei ole TIMin kehittämä tai ylläpitämä windows Koskee Windows-käyttöjärjestelmää.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants