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

Maintenance: Fix error when creating a developer environment in Gitpod #4530

Closed
1 of 2 tasks
leandrodamascena opened this issue Jun 14, 2024 · 3 comments · Fixed by #4532
Closed
1 of 2 tasks

Maintenance: Fix error when creating a developer environment in Gitpod #4530

leandrodamascena opened this issue Jun 14, 2024 · 3 comments · Fixed by #4532
Assignees
Labels
internal Maintenance changes

Comments

@leandrodamascena
Copy link
Contributor

Why is this needed?

When trying to run make dev-gitpod we get this error

- Installing poetry-bumpversion (0.0.0 315fe33): Failed

  ChefInstallError

  Failed to install poetry-core.
  
  Output:
  Updating dependencies
  Resolving dependencies...
  
  Package operations: 1 install, 0 updates, 0 removals
  
    - Installing poetry-core (1.9.0)
  
    CalledProcessError
  
    Command '['/tmp/tmp2m752m6b/.venv/bin/python', '-I', '-W', 'ignore', '-c', '\nimport importlib.util\nimport json\nimport sys\n\nfrom pathlib import Path\n\nspec = importlib.util.spec_from_file_location(\n    "packaging", Path(r"/workspace/.pyenv_mirror/user/3.9.13/lib/python3.9/site-packages/packaging/__init__.py")\n)\npackaging = importlib.util.module_from_spec(spec)\nsys.modules[spec.name] = packaging\n\nspec = importlib.util.spec_from_file_location(\n    "packaging.tags", Path(r"/workspace/.pyenv_mirror/user/3.9.13/lib/python3.9/site-packages/packaging/tags.py")\n)\npackaging_tags = importlib.util.module_from_spec(spec)\nspec.loader.exec_module(packaging_tags)\n\nprint(\n    json.dumps([(t.interpreter, t.abi, t.platform) for t in packaging_tags.sys_tags()])\n)\n']' returned non-zero exit status 1.
  
    at ~/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py:528 in run
         524│             # We don't call process.wait() as .__exit__ does that for us.
         525│             raise
         526│         retcode = process.poll()
         527│         if check and retcode:
      →  528│             raise CalledProcessError(retcode, process.args,
         529│                                      output=stdout, stderr=stderr)
         530│     return CompletedProcess(process.args, retcode, stdout, stderr)
         531│ 
         532│ 
  
  The following error occurred when trying to handle this error:
  
  
    EnvCommandError
  
    Command ['/tmp/tmp2m752m6b/.venv/bin/python', '-I', '-W', 'ignore', '-c', '\nimport importlib.util\nimport json\nimport sys\n\nfrom pathlib import Path\n\nspec = importlib.util.spec_from_file_location(\n    "packaging", Path(r"/workspace/.pyenv_mirror/user/3.9.13/lib/python3.9/site-packages/packaging/__init__.py")\n)\npackaging = importlib.util.module_from_spec(spec)\nsys.modules[spec.name] = packaging\n\nspec = importlib.util.spec_from_file_location(\n    "packaging.tags", Path(r"/workspace/.pyenv_mirror/user/3.9.13/lib/python3.9/site-packages/packaging/tags.py")\n)\npackaging_tags = importlib.util.module_from_spec(spec)\nspec.loader.exec_module(packaging_tags)\n\nprint(\n    json.dumps([(t.interpreter, t.abi, t.platform) for t in packaging_tags.sys_tags()])\n)\n'] errored with the following return code 1
    
    Error output:
    Traceback (most recent call last):
      File "<string>", line 18, in <module>
      File "<frozen importlib._bootstrap_external>", line 846, in exec_module
      File "<frozen importlib._bootstrap_external>", line 982, in get_code
      File "<frozen importlib._bootstrap_external>", line 1039, in get_data
    FileNotFoundError: [Errno 2] No such file or directory: '/workspace/.pyenv_mirror/user/3.9.13/lib/python3.9/site-packages/packaging/tags.py'
    
  
    at ~/.pyenv/versions/3.9.13/lib/python3.9/site-packages/poetry/utils/env/base_env.py:342 in _run
        338│                 output = subprocess.check_output(
        339│                     cmd, stderr=stderr, env=env, text=True, **kwargs
        340│                 )
        341│         except CalledProcessError as e:
      → 342│             raise EnvCommandError(e)
        343│ 
        344│         return output
        345│ 
        346│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
  
  Cannot install poetry-core.
  
  
  
  Error:
  

  at ~/.pyenv/versions/3.9.13/lib/python3.9/site-packages/poetry/installation/chef.py:102 in install
       98│             InstalledRepository.load(self._env),
       99│         )
      100│         installer.update(True)
      101│         if installer.run() != 0:
    → 102│             raise ChefInstallError(requirements, io.fetch_output(), io.fetch_error())
      103│ 
      104│ 
      105│ class Chef:
      106│     def __init__(

Cannot install build-system.requires for poetry-bumpversion.

make[1]: *** [Makefile:117: dev-version-plugin] Error 1
make[1]: Leaving directory '/workspace/powertools-lambda-python'
make: *** [Makefile:10: dev] Error 2
gitpod /workspace/powertools-lambda-python (develop) $ 

Which area does this relate to?

Automation

Solution

No response

Acknowledgment

Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions github-actions bot added the pending-release Fix or implementation already in dev waiting to be released label Jun 17, 2024
@heitorlessa heitorlessa moved this from Coming soon to Shipped in Powertools for AWS Lambda (Python) Jun 24, 2024
@heitorlessa heitorlessa removed the triage Pending triage from maintainers label Jun 24, 2024
@heitorlessa
Copy link
Contributor

removed triage label

Copy link
Contributor

This is now released under 2.40.0 version!

@github-actions github-actions bot removed the pending-release Fix or implementation already in dev waiting to be released label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Maintenance changes
Projects
Status: Shipped
2 participants