-
Notifications
You must be signed in to change notification settings - Fork 42
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
0.4.36 cbBuild fails due to egg file accessed through open method #72
Comments
I wonder why are md5 being checked for files that come with the installation... |
Well, it's not recommended, you're right. It's similar to Python file
handles that should be closed but in practice don't need to be closed. :-)
This worked until now for you and it works on every platform that I tested.
How come that it suddenly fails...? Did you change something on your
machine?
…On Fri, Feb 8, 2019 at 10:43 AM Pablo Moreno ***@***.***> wrote:
Running cbBuild on a config file generated through some of the available R
code here generates the following error:
INFO:root:Found 1 datasets
Traceback (most recent call last):
File ***@***.***/bin/cbBuild", line 11, in <module>
load_entry_point('cellbrowser==0.4.36', 'console_scripts', 'cbBuild')()
File ***@***.***/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 3069, in cbBuildCli
File ***@***.***/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 2916, in cbBuild
File ***@***.***/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 2946, in build
File ***@***.***/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 3272, in cbMake
File ***@***.***/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 3226, in makeIndexHtml
File ***@***.***/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 3165, in writeVersionedLink
File ***@***.***/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 2499, in md5WithPython
NotADirectoryError: [Errno 20] Not a directory: ***@***.***/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cbWeb/ext/jquery-ui-1.12.1.css'
My understanding is that you cannot access a file within an egg through
open, as it is done here:
https:/maximilianh/cellBrowser/blob/f1b0d067f53fe6dee8efec9388582cea8ff4eab1/src/cbPyLib/cellbrowser/cellbrowser.py#L2524
with file
lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cbWeb/ext/jquery-ui-1.12.1.css
inside the egg.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#72>, or mute the thread
<https:/notifications/unsubscribe-auth/AAS-TWTQiGsB247SGFmAqzx28NaL03uTks5vLcU5gaJpZM4axB09>
.
|
Well, I have to say I haven't got this far before with this newest versions, and maybe I'm one of the few using cellbrowser through a conda installation. But I'm always doing essentially the same:
this is on a fresh installation of 0.4.36 using conda on a fresh conda environment (I haven't pushed the 0.4.36 changes to bioconda since it seems to be broken on a canonical execution). Do your other installation methods also produce eggs? or do they produce wheels (maybe only the conda installation produces eggs? or maybe this only affects distribution?) |
I have left here https://drive.google.com/file/d/1qRBnYejfcepFrQa3eotLPx7AljQmANnd/view?usp=sharing a tar.gz with the inputs for Checking out https:/ebi-gene-expression-group/bioconda-recipes/tree/cellbrowser-0.4.36 and doing:
should reproduce the issue (hopefully). I had to move away from using cbImportSeurat2, as the conda package adding seurat as a dependency was very large and took a while to install everytime. So now I create the files for cellbrowser inside a seurat container using the R script you have in this repo taken from seurat3. |
I will try and see whether the latest tagged version exhibits the same problem, but judging by the code I presume is probably the case still. |
An interesting discussion here: https://stackoverflow.com/questions/49782111/access-a-file-from-a-python-egg |
Yes, you're absolutely right. I have to fix this.
I am still curious why this has never happened to me or anyone else I
know....
Did you change something in the way you install these packages? Did you run
a normal pip install to get the package installed?
…On Fri, Feb 8, 2019 at 1:55 PM Pablo Moreno ***@***.***> wrote:
An interesting discussion here:
https://stackoverflow.com/questions/49782111/access-a-file-from-a-python-egg
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#72 (comment)>,
or mute the thread
<https:/notifications/unsubscribe-auth/AAS-TY-kATpmN8dpQl9PPwcBaCqznRScks5vLfI2gaJpZM4axB09>
.
|
No, I don't think that conda uses pip to install python packages, but rather use setuptools or alike directly, which probably leaves the package installed in a slightly different manner. |
I can confirm that the error doesn't show up when installing through pip, as pip doesn't produce eggs and leaves the directory structure complete and not inside the zipped egg. |
The egg format is not supported anymore and the community has moved away from it. Pip removed support for it pypa/pip#1749 To make sure that conda doesn't try an egg install anymore (how did you obtain the egg? I'm unable to get one, no matter what I specify) I've added an option now to setup.py to make sure that it always creates a wheel. Thanks! |
No worries, I switched the way that the conda package is installed, so it doesn't use eggs anymore. |
Running cbBuild on a config file generated through some of the available R code here generates the following error:
My understanding is that you cannot access a file within an egg through open, as it is done here:
cellBrowser/src/cbPyLib/cellbrowser/cellbrowser.py
Line 2524 in f1b0d06
with file
lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cbWeb/ext/jquery-ui-1.12.1.css
inside the egg.The text was updated successfully, but these errors were encountered: