← Back to issue list

snapcraft throws FileExistsError: with very simple Python snap

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1499424
Type
issue
State
closed
Author
~rick-rickspencer3
Labels
Created
Updated
Closed

Current evaluation

Closed without comments or explicit resolution. The FileExistsError during snapcraft stage was likely resolved in a subsequent snapcraft release or abandoned due to inactivity.

Suggested action:

No scores available.

Issue body

Trying out snapcraft, starting with a very simple project. I wrote a very simple Python service: import time i = 0 while i < 1000: print("this is a python snap: " + str(i)) i += 1 time.sleep(5) I wrote the following snpacraft.yaml: name: python-snap version: 1 vendor: Rick Spencer <email address hidden> summary: a test of snapcraft description: a longer test of snapcraft icon: icon.png parts: loop: type: python3-project source: ./hello-python. I ran $snapcraft stage and got this error: py3versions -i Traceback (most recent call last): File "/usr/bin/snapcraft", line 33, in <module> snapcraft.main.main() File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 80, in main args.func(args) File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 328, in cmd common.env = config.build_env_for_part(part) File "/usr/lib/python3/dist-packages/snapcraft/yaml.py", line 221, in build_env_for_part env += part.env(part.installdir) File "/usr/lib/python3/dist-packages/snapcraft/plugin.py", line 282, in env return getattr(self.code, 'env')(root) File "/usr/lib/python3/dist-packages/snapcraft/plugins/python3_project.py", line 38, in env root, 'usr', 'lib', self.python_version, 'dist-packages')] File "/usr/lib/python3/dist-packages/snapcraft/plugins/python3_project.py", line 106, in python_version return self.run_output(['py3versions', '-i']) File "/usr/lib/python3/dist-packages/snapcraft/__init__.py", line 80, in run_output self.makedirs(cwd) File "/usr/lib/python3/dist-packages/snapcraft/__init__.py", line 112, in makedirs os.makedirs(d, exist_ok=True) File "/usr/lib/python3.4/os.py", line 237, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/rick/Projects/phw/parts/loop/build'

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without comments or explicit resolution. The FileExistsError during snapcraft stage was likely resolved in a subsequent snapcraft release or abandoned due to inactivity.
qwen/qwen3.6-35b-a3b Closed without comments or resolution. The FileExistsError during snapcraft stage was abandoned and likely fixed in later versions.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#21 snapcraft throws FileExistsError: with very simple Python snap snapcraft closed Fixed in a maintainer branch. The FileExistsError during snapcraft stage was resolved by replacing the traceback with a clear error message indicating that the local source path must be a directory.
90%
#1778716 snapcraft clean snapcraft fails as it cannot find python snapcraft (launchpad) closed Closed without comments or explicit resolution, likely abandoned or resolved in a later release. The bug reported a MissingPythonCommandError during snapcraft clean due to python3 path resolution ordering.
75%
#1761488 snapcraft 2.39.2 failed to release a snap: snapcraft.storeapi.errors.StoreReleaseError: <exception str() failed> snapcraft (launchpad) closed Closed without resolution. The report details a StoreReleaseError during snapcraft 2.39.2 release attempts. With zero maintainer comments and significant age, the issue was likely abandoned. No fix or workaround was provided.
74%
#1829413 snapcraft requested file bug report snapcraft (launchpad) open Snapcraft 2.43.1 crashed with FileNotFoundError on the snapcraftctl function_call fifo after a keepalived compile failure on Xenial. No maintainer activity in ~7 years; the snapcraftctl code path no longer exists in the current codebase and the affected version is EOL.
73%
#1867052 Snapcraft crashes while creating snap for ssh-audit snapcraft (launchpad) closed Snapcraft v2.43.1 crashes with FileNotFoundError during snap packaging due to a missing executable path in snapcraft.yaml. Issue is completely inactive for over 6 years.
72%
#1816555 snapcraft traceback stat-ing symlink trying to enforce exec snapcraft (launchpad) closed Closed without resolution. Snapcraft crashed with a FileNotFoundError when enforcing executable permissions on a symlinked hook. Zero comments were posted, indicating the report was abandoned.
72%
#1633613 useless "no such file or directory" message snapcraft (launchpad) closed A confusing snapcraft error message report was closed without comments or resolution, likely abandoned due to prolonged inactivity. No fix or workaround was implemented.
72%
#1723965 snapcraft doesn't work snapcraft (launchpad) closed Closed without resolution or comments, indicating abandonment. The reported snap command failure and GL driver errors remain unresolved.
71%
#5167 Snapcraft raises an internal error if there is a file called `snap` snapcraft closed Snapcraft crashed with a NotADirectoryError when a file named snap existed in the working directory. The bug was fixed via pull request #5512 and the issue is closed.
71%
#1604326 snapcraft init doesn't fail if there is a .snapcraft.yaml file snapcraft (launchpad) closed Closed without resolution. The snapcraft init command remains unchanged and still creates snapcraft.yaml when .snapcraft.yaml exists, indicating the bug was abandoned or superseded by newer project changes.
70%