You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In version 1.2.0, I encountered an error while using 'podman-compose -f lobe/compose.yaml pull', but it worked fine in version 1.1.0. Using the absolute path works normally, but using the relative path results in an error.
Traceback (most recent call last):
File "/usr/local/bin/podman-compose", line 8, in<module>sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/dist-packages/podman_compose.py", line 3526, in main
asyncio.run(async_main())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
returnfuture.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/podman_compose.py", line 3522, in async_main
await podman_compose.run()
File "/usr/local/lib/python3.11/dist-packages/podman_compose.py", line 1753, in run
self._parse_compose_file()
File "/usr/local/lib/python3.11/dist-packages/podman_compose.py", line 1848, in _parse_compose_file
with open(filename, "r", encoding="utf-8") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'lobe/compose.yaml'
To Reproduce
There is a compose.yaml file for lobe-chat in the lobe directory.
Go back to the parent directory and run: podman-compose -f lobe/compose.yaml pull.
Expected behavior
nomal pull
Actual behavior
What is the behavior you actually got and that should not happen.
Output
$ podman-compose version
podman-compose version 1.2.0
podman version 5.2.2
$ podman-compose -f lobe/compose.yaml pull
Traceback (most recent call last):
File "/usr/local/bin/podman-compose", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/dist-packages/podman_compose.py", line 3526, in main
asyncio.run(async_main())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/podman_compose.py", line 3522, in async_main
await podman_compose.run()
File "/usr/local/lib/python3.11/dist-packages/podman_compose.py", line 1753, in run
self._parse_compose_file()
File "/usr/local/lib/python3.11/dist-packages/podman_compose.py", line 1848, in _parse_compose_file
with open(filename, "r", encoding="utf-8") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'lobe/compose.yaml'
**Environment:**
- OS: Linux
- podman version: 5.2.2
- podman compose version: 1.2.0
The text was updated successfully, but these errors were encountered:
Seems like the relative path is used after the working directory is changed. Interestingly, there is a "TODO Remove" comment above the directory change in line 1815.
An alternative to deleting the line (maybe there is a reason why it wasn't removed) is making the filenames absolute:
@@ -1790,6 +1790,7 @@ class PodmanCompose:
sys.exit(1)
# make absolute
relative_files = files
+ files = [os.path.realpath(filename) for filename in files]
filename = files[0]
project_name = args.project_name
# no_ansi = args.no_ansi
Describe the bug
In version 1.2.0, I encountered an error while using 'podman-compose -f lobe/compose.yaml pull', but it worked fine in version 1.1.0. Using the absolute path works normally, but using the relative path results in an error.
To Reproduce
Expected behavior
nomal pull
Actual behavior
What is the behavior you actually got and that should not happen.
Output
The text was updated successfully, but these errors were encountered: