Closed whinee closed 1 year ago
Apologies for not providing enough information regarding this issue. I have been called for dinner last night in the middle of writing this. Will edit right now.
Hello @whinee,
Thank you for your detailed report, and for solving this issue :)
I just submitted a patch, based on your findings, that should solve your white space issue. Don't hesitate to let me know if it does not work.
Thanks again for spotting this.
Hello, I just read your comment. Thank you for immediately acting upon this issue.
However, I am unable to test this out for the next 3 days or so due to my school works. But, I will get to you as soon as possible.
Again, thank you!
I lied, I just got the time to test the latest release out. And yep, it is working as expected.
Thank you, @niess, for taking the time to resolve this issue.
Summary
Type: Bug
Explanation
Python environments made with the current AppImage does not work when put inside a directory with a space in it.
Proposed Solution
At python_appimage/data/python-wrapper.sh, line 7, column 28 to 30 (the
$0
) needed to be encapsulated with double quotation marks ("
).Environment
OS: Arch Linux Kernel: 5.19.7-arch1-1 Shell: zsh 5.9 (x86_64-pc-linux-gnu) AppImage: python3.9.14-cp39-cp39-manylinux2014_x86_64.AppImage
Explanation
Greetings! Let it be known that I do not have a lot of expertise in this kind of stuff.
To start, I've been using your python appimages to make a python environment if the version is not available at my package manager (I use Arch Linux, and AUR does not keep older versions of python, nor does it for any other programs).
In any case, this works well for me. I've never had any problems with it for a month that I've been using it. But it had been at least a month since I last touched that thingy. And now, I tried to make a python environment using a python 3.9 appimage, as the service that my project deploys to does not have python 3.10 available.
In any case, this fails specifically at the point where the python environment tries to install pip. This is an example of the error:
How to Replicate
$HOME
directory, make 2 folder deep file structure, without any spaces in its name. In this example, we will usea/b
.c d
.e
.pyver
variable with python version you wish to download from this repository. In this example, we will set it as3.9
With this, the last command should fail with the following error:
Tracking Down Bug
I tried to track where this error came from, as the error did not provide any information on what file is throwing this error, and I found it on
./pyenv/opt/python3.9/lib/python3.9/venv/__main__.py
, at the part where it tries to install pip, as said earlier.Well... I though that the thingy running that command just do not have enough quotations. But nawp! So I tried tracing the problem in the scripts, starting from the activate script, and got me to the
pyenv/bin/python
.I kinda debugged it, and saw that
$APPDIR
's value is/home/whinee/
instead of/home/whinee/projects/personal/directory with space/project/pyenv/
. So I started fiddling with the quotations, and sure enough, it lacked one. I encapsulated$0
at line 7 with double quotations, and it worked like it should!Proposed Solution
As said earlier, encapsulating python_appimage/data/python-wrapper.sh, line 7, column 28 to 30 with double quotation marks (
"
) solved the problem for me.Rationale for Not Opening Pull Request
But you ask:
Well... many reasons, actually:
Anyways, I hope that this issue will be resolved soon, thanks!