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

[Bug]: When try to build #1246

Closed
Korolev-Oleg opened this issue Apr 19, 2023 · 5 comments
Closed

[Bug]: When try to build #1246

Korolev-Oleg opened this issue Apr 19, 2023 · 5 comments
Assignees
Labels

Comments

@Korolev-Oleg
Copy link

Relevant scope

Backend specs

Description

After running sudo docker compose build I get error described below

[+] Building 13.4s (9/10)                                                                                                                                                                                                               
 => [internal] load build definition from Dockerfile                                                                                                                                                                               0.0s
 => => transferring dockerfile: 500B                                                                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                  0.0s
 => => transferring context: 247B                                                                                                                                                                                                  0.0s
 => [internal] load metadata for docker.io/library/python:3.9.10-slim                                                                                                                                                              1.9s
 => [internal] load build context                                                                                                                                                                                                  0.0s
 => => transferring context: 235.06kB                                                                                                                                                                                              0.0s
 => [1/6] FROM docker.io/library/python:3.9.10-slim@sha256:f43f874bc50ba29cb1d9ea052c2e2db4e55df2c5a1b7d2a77e57f33a7536b752                                                                                                        0.0s
 => CACHED [2/6] WORKDIR /app                                                                                                                                                                                                      0.0s
 => CACHED [3/6] RUN apt-get update &&     apt-get install -y --no-install-recommends netcat &&     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*                                                                                  0.0s
 => CACHED [4/6] COPY poetry.lock pyproject.toml ./                                                                                                                                                                                0.0s
 => ERROR [5/6] RUN pip install poetry==1.1 &&     poetry config virtualenvs.in-project true &&     poetry install --no-dev                                                                                                       11.4s
------
 > [5/6] RUN pip install poetry==1.1 &&     poetry config virtualenvs.in-project true &&     poetry install --no-dev:
#0 2.286 Collecting poetry==1.1
#0 2.344   Downloading poetry-1.1.0-py2.py3-none-any.whl (168 kB)
#0 2.481 Collecting pkginfo<2.0,>=1.4
#0 2.490   Downloading pkginfo-1.9.6-py3-none-any.whl (30 kB)
#0 2.600 Collecting requests<3.0,>=2.18
#0 2.610   Downloading requests-2.28.2-py3-none-any.whl (62 kB)
#0 2.652 Collecting cachy<0.4.0,>=0.3.0
#0 2.664   Downloading cachy-0.3.0-py2.py3-none-any.whl (20 kB)
#0 2.712 Collecting pexpect<5.0.0,>=4.7.0
#0 2.741   Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
#0 2.995 Collecting virtualenv<21.0.0,>=20.0.26
#0 3.005   Downloading virtualenv-20.21.0-py3-none-any.whl (8.7 MB)
#0 3.235 Collecting requests-toolbelt<0.10.0,>=0.9.1
#0 3.247   Downloading requests_toolbelt-0.9.1-py2.py3-none-any.whl (54 kB)
#0 3.304 Collecting clikit<0.7.0,>=0.6.2
#0 3.315   Downloading clikit-0.6.2-py2.py3-none-any.whl (91 kB)
#0 3.383 Collecting cleo<0.9.0,>=0.8.1
#0 3.393   Downloading cleo-0.8.1-py2.py3-none-any.whl (21 kB)
#0 3.449 Collecting shellingham<2.0,>=1.1
#0 3.458   Downloading shellingham-1.5.0.post1-py2.py3-none-any.whl (9.4 kB)
#0 3.491 Collecting crashtest<0.4.0,>=0.3.0
#0 3.500   Downloading crashtest-0.3.1-py3-none-any.whl (7.0 kB)
#0 3.603 Collecting poetry-core<2.0.0,>=1.0.0
#0 3.614   Downloading poetry_core-1.5.2-py3-none-any.whl (465 kB)
#0 3.671 Collecting cachecontrol[filecache]<0.13.0,>=0.12.4
#0 3.680   Downloading CacheControl-0.12.11-py2.py3-none-any.whl (21 kB)
#0 3.717 Collecting html5lib<2.0,>=1.0
#0 3.727   Downloading html5lib-1.1-py2.py3-none-any.whl (112 kB)
#0 3.818 Collecting tomlkit<1.0.0,>=0.7.0
#0 3.827   Downloading tomlkit-0.11.7-py3-none-any.whl (35 kB)
#0 3.972 Collecting keyring<22.0.0,>=21.2.0
#0 4.017   Downloading keyring-21.8.0-py3-none-any.whl (32 kB)
#0 4.092 Collecting packaging<21.0,>=20.4
#0 4.110   Downloading packaging-20.9-py2.py3-none-any.whl (40 kB)
#0 4.322 Collecting msgpack>=0.5.2
#0 4.333   Downloading msgpack-1.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (322 kB)
#0 4.372 Collecting lockfile>=0.9
#0 4.381   Downloading lockfile-0.12.2-py2.py3-none-any.whl (13 kB)
#0 4.751 Collecting pastel<0.3.0,>=0.2.0
#0 4.761   Downloading pastel-0.2.1-py2.py3-none-any.whl (6.0 kB)
#0 4.787 Collecting pylev<2.0,>=1.3
#0 4.796   Downloading pylev-1.4.0-py2.py3-none-any.whl (6.1 kB)
#0 4.837 Collecting webencodings
#0 4.846   Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
#0 4.885 Collecting six>=1.9
#0 4.894   Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
#0 4.971 Collecting SecretStorage>=3.2
#0 4.980   Downloading SecretStorage-3.3.3-py3-none-any.whl (15 kB)
#0 5.021 Collecting jeepney>=0.4.2
#0 5.030   Downloading jeepney-0.8.0-py3-none-any.whl (48 kB)
#0 5.161 Collecting pyparsing>=2.0.2
#0 5.170   Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
#0 5.216 Collecting ptyprocess>=0.5
#0 5.226   Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
#0 5.316 Collecting idna<4,>=2.5
#0 5.326   Downloading idna-3.4-py3-none-any.whl (61 kB)
#0 5.421 Collecting urllib3<1.27,>=1.21.1
#0 5.430   Downloading urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
#0 5.648 Collecting charset-normalizer<4,>=2
#0 5.660   Downloading charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199 kB)
#0 5.728 Collecting certifi>=2017.4.17
#0 5.739   Downloading certifi-2022.12.7-py3-none-any.whl (155 kB)
#0 6.544 Collecting cryptography>=2.0
#0 6.554   Downloading cryptography-40.0.2-cp36-abi3-manylinux_2_28_x86_64.whl (3.7 MB)
#0 7.134 Collecting cffi>=1.12
#0 7.142   Downloading cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
#0 7.197 Collecting pycparser
#0 7.206   Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
#0 7.338 Collecting distlib<1,>=0.3.6
#0 7.347   Downloading distlib-0.3.6-py2.py3-none-any.whl (468 kB)
#0 7.427 Collecting filelock<4,>=3.4.1
#0 7.436   Downloading filelock-3.12.0-py3-none-any.whl (10 kB)
#0 7.488 Collecting platformdirs<4,>=2.4
#0 7.497   Downloading platformdirs-3.2.0-py3-none-any.whl (14 kB)
#0 7.858 Installing collected packages: pycparser, urllib3, idna, charset-normalizer, cffi, certifi, requests, pylev, pastel, msgpack, jeepney, cryptography, crashtest, webencodings, six, SecretStorage, pyparsing, ptyprocess, platformdirs, lockfile, filelock, distlib, clikit, cachecontrol, virtualenv, tomlkit, shellingham, requests-toolbelt, poetry-core, pkginfo, pexpect, packaging, keyring, html5lib, cleo, cachy, poetry
#0 10.76 Successfully installed SecretStorage-3.3.3 cachecontrol-0.12.11 cachy-0.3.0 certifi-2022.12.7 cffi-1.15.1 charset-normalizer-3.1.0 cleo-0.8.1 clikit-0.6.2 crashtest-0.3.1 cryptography-40.0.2 distlib-0.3.6 filelock-3.12.0 html5lib-1.1 idna-3.4 jeepney-0.8.0 keyring-21.8.0 lockfile-0.12.2 msgpack-1.0.5 packaging-20.9 pastel-0.2.1 pexpect-4.8.0 pkginfo-1.9.6 platformdirs-3.2.0 poetry-1.1.0 poetry-core-1.5.2 ptyprocess-0.7.0 pycparser-2.21 pylev-1.4.0 pyparsing-3.0.9 requests-2.28.2 requests-toolbelt-0.9.1 shellingham-1.5.0.post1 six-1.16.0 tomlkit-0.11.7 urllib3-1.26.15 virtualenv-20.21.0 webencodings-0.5.1
#0 10.76 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#0 10.92 WARNING: You are using pip version 21.2.4; however, version 23.1 is available.
#0 10.92 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
#0 11.30 Traceback (most recent call last):
#0 11.30   File "/usr/local/bin/poetry", line 5, in <module>
#0 11.30     from poetry.console import main
#0 11.30   File "/usr/local/lib/python3.9/site-packages/poetry/console/__init__.py", line 1, in <module>
#0 11.30     from .application import Application
#0 11.30   File "/usr/local/lib/python3.9/site-packages/poetry/console/application.py", line 7, in <module>
#0 11.30     from .commands.about import AboutCommand
#0 11.30   File "/usr/local/lib/python3.9/site-packages/poetry/console/commands/__init__.py", line 4, in <module>
#0 11.30     from .check import CheckCommand
#0 11.30   File "/usr/local/lib/python3.9/site-packages/poetry/console/commands/check.py", line 2, in <module>
#0 11.30     from poetry.factory import Factory
#0 11.30   File "/usr/local/lib/python3.9/site-packages/poetry/factory.py", line 16, in <module>
#0 11.30     from .packages.locker import Locker
#0 11.30   File "/usr/local/lib/python3.9/site-packages/poetry/packages/__init__.py", line 2, in <module>
#0 11.30     from .locker import Locker
#0 11.30   File "/usr/local/lib/python3.9/site-packages/poetry/packages/locker.py", line 20, in <module>
#0 11.30     import poetry.repositories
#0 11.30   File "/usr/local/lib/python3.9/site-packages/poetry/repositories/__init__.py", line 1, in <module>
#0 11.30     from .pool import Pool
#0 11.30   File "/usr/local/lib/python3.9/site-packages/poetry/repositories/pool.py", line 8, in <module>
#0 11.30     from .repository import Repository
#0 11.30   File "/usr/local/lib/python3.9/site-packages/poetry/repositories/repository.py", line 1, in <module>
#0 11.30     from poetry.core.semver import VersionConstraint
#0 11.30 ImportError: cannot import name 'VersionConstraint' from 'poetry.core.semver' (/usr/local/lib/python3.9/site-packages/poetry/core/semver/__init__.py)
------
failed to solve: process "/bin/sh -c pip install poetry==1.1 &&     poetry config virtualenvs.in-project true &&     poetry install --no-dev" did not complete successfully: exit code: 1
@Korolev-Oleg
Copy link
Author

I think this is related to the fact that an insufficiently precise version of poetry is specified. I assume that it is not necessary to specify it in principle, as by default Poetry supports long-term backward compatibility, which means that when updating the Poetry version in your project, everything should continue to work as before. And all dependencies are defined in the pyproject.toml file.

@geromegrignon
Copy link
Contributor

Hi, there is no docker in this project, is it about some community implementation?

@Korolev-Oleg
Copy link
Author

Hi, there is no docker in this project, is it about some community implementation?

My apologies, I should have opened this issue for the fastapi-realworld-example-app project

@geromegrignon
Copy link
Contributor

The project has been archived sadly, so there is no way to open an issue on it.
I would not be able to help with such an error.
If you can't contact the author and find a way to fix it, I'll update the implementation listing to add your fixed fork if you want.

@Korolev-Oleg
Copy link
Author

The project has been archived sadly, so there is no way to open an issue on it. I would not be able to help with such an error. If you can't contact the author and find a way to fix it, I'll update the implementation listing to add your fixed fork if you want.

I think it would be nice to have a working example of one of the most performant frameworks in Python. I would slightly modify it by adding support for a more modern database driver, psycopg3. I will probably do this while working on the next project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants