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

Importing scPRINT v2.0.0 fails with "No such file or directory" #14

Open
lazappi opened this issue Jan 13, 2025 · 0 comments
Open

Importing scPRINT v2.0.0 fails with "No such file or directory" #14

lazappi opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@lazappi
Copy link

lazappi commented Jan 13, 2025

Describe the bug

Importing scprint fails with a "No such file or directory" error

Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import scprint
→ connected lamindb: anonymous/main
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/scprint/__init__.py", line 3, in <module>
    from .model.model import scPrint
  File "/usr/local/lib/python3.10/dist-packages/scprint/model/__init__.py", line 1, in <module>
    from .model import *
  File "/usr/local/lib/python3.10/dist-packages/scprint/model/model.py", line 24, in <module>
    from . import decoders, encoders, fsq, loss, utils
  File "/usr/local/lib/python3.10/dist-packages/scprint/model/utils.py", line 404, in <module>
    class WeightedMasker:
  File "/usr/local/lib/python3.10/dist-packages/scprint/model/utils.py", line 408, in WeightedMasker
    TFs: list[str] = utils.fileToList(FILEDIR + "/../../data/main/TFs.txt"),
  File "/usr/local/lib/python3.10/dist-packages/scprint/utils/utils.py", line 53, in fileToList
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.10/dist-packages/scprint/model/../../data/main/TFs.txt'

It seems like the data/ directory containing TFs.txt isn't installed with the package:

root@41d356636499:/workspace# ls /usr/local/lib/python3.10/dist-packages/scprint/
VERSION  __init__.py  __main__.py  __pycache__  base.py  cli.py  model  tasks  tokenizers  trainer  utils

Desktop (please complete the following information):

  • OS: Linux (Docker)
  • Version: 2.0.0
@lazappi lazappi added bug Something isn't working help wanted Extra attention is needed labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant