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

0.4.36 cbBuild fails due to egg file accessed through open method #72

Closed
pcm32 opened this issue Feb 8, 2019 · 11 comments
Closed

0.4.36 cbBuild fails due to egg file accessed through open method #72

pcm32 opened this issue Feb 8, 2019 · 11 comments

Comments

@pcm32
Copy link
Contributor

pcm32 commented Feb 8, 2019

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 "/Users/pmoreno/miniconda3/envs/[email protected]/bin/cbBuild", line 11, in <module>
    load_entry_point('cellbrowser==0.4.36', 'console_scripts', 'cbBuild')()
  File "/Users/pmoreno/miniconda3/envs/[email protected]/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 3069, in cbBuildCli
  File "/Users/pmoreno/miniconda3/envs/[email protected]/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 2916, in cbBuild
  File "/Users/pmoreno/miniconda3/envs/[email protected]/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 2946, in build
  File "/Users/pmoreno/miniconda3/envs/[email protected]/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 3272, in cbMake
  File "/Users/pmoreno/miniconda3/envs/[email protected]/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 3226, in makeIndexHtml
  File "/Users/pmoreno/miniconda3/envs/[email protected]/lib/python3.7/site-packages/cellbrowser-0.4.36-py3.7.egg/cellbrowser/cellbrowser.py", line 3165, in writeVersionedLink
  File "/Users/pmoreno/miniconda3/envs/[email protected]/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: '/Users/pmoreno/miniconda3/envs/[email protected]/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:

with open(fname, "rb") as f:

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.

@pcm32
Copy link
Contributor Author

pcm32 commented Feb 8, 2019

I wonder why are md5 being checked for files that come with the installation...

@maximilianh
Copy link
Owner

maximilianh commented Feb 8, 2019 via email

@pcm32
Copy link
Contributor Author

pcm32 commented Feb 8, 2019

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:

# somehow create the files for cbBuild, in this case with the R script provided for seurat2
cbBuild -i cellbrowser.conf -o outHTML

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?)

@pcm32
Copy link
Contributor Author

pcm32 commented Feb 8, 2019

I have left here https://drive.google.com/file/d/1qRBnYejfcepFrQa3eotLPx7AljQmANnd/view?usp=sharing a tar.gz with the inputs for cellbrowser.conf -i cellbrowser.conf -o outHTML that I used, with the resulting html folder (although it fails to finish with the mentioned error).

Checking out https:/ebi-gene-expression-group/bioconda-recipes/tree/cellbrowser-0.4.36 and doing:

conda build recipes/ucsc-cell-browser
conda create -n ucsc_cell_browser\@0.4.36
conda activate ucsc_cell_browser\@0.4.36
conda install ucsc-cell-browser=0.4.36 --use-local
tar -xf <tar-file-mentioned-above>
cellbrowser.conf -i cellbrowser.conf -o outHTML2

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.

@pcm32
Copy link
Contributor Author

pcm32 commented Feb 8, 2019

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.

@pcm32
Copy link
Contributor Author

pcm32 commented Feb 8, 2019

@maximilianh
Copy link
Owner

maximilianh commented Feb 10, 2019 via email

@pcm32
Copy link
Contributor Author

pcm32 commented Feb 11, 2019

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.

@pcm32
Copy link
Contributor Author

pcm32 commented Feb 11, 2019

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.

@maximilianh
Copy link
Owner

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!

@pcm32
Copy link
Contributor Author

pcm32 commented Mar 1, 2019

No worries, I switched the way that the conda package is installed, so it doesn't use eggs anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants