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

Error running sample code: OSError: [Errno 36] File name too long #447

Open
kryptec opened this issue Aug 17, 2022 · 1 comment
Open

Error running sample code: OSError: [Errno 36] File name too long #447

kryptec opened this issue Aug 17, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@kryptec
Copy link

kryptec commented Aug 17, 2022

Running this EntityLinker example code from the github repo throws the following error

OSError: [Errno 36] File name too long: '/home/username/.scispacy/datasets/e9f7327283e43f0482f7c0c71b71dec278a58ccb3ffdd03c2c2350159e7ef146.f2a350ad19015b2591545f7feeed6a6d6d2fffcd635d868a5d7fc0dfc3cadfd8.tfidf_vectors_sparse.npz'

#!/usr/bin/env python3

import spacy
import scispacy


from scispacy.linking import EntityLinker

nlp = spacy.load("en_core_sci_sm")

# This line takes a while, because we have to download ~1GB of data
# and load a large JSON file (the knowledge base). Be patient!
# Thankfully it should be faster after the first time you use it, because
# the downloads are cached.
# NOTE: The resolve_abbreviations parameter is optional, and requires that
# the AbbreviationDetector pipe has already been added to the pipeline. Adding
# the AbbreviationDetector pipe and setting resolve_abbreviations to True means
# that linking will only be performed on the long form of abbreviations.


nlp.add_pipe(
    "scispacy_linker",
    config={"resolve_abbreviations": False, "linker_name": "umls"},
)

This is on linux mint 20.3, python 3.7.13

@dakinggg
Copy link
Collaborator

From a brief google, this looks like it might be encryption + linux mint related? https://forums.linuxmint.com/viewtopic.php?t=173328

That being said, if you aren't able to resolve the long file names, please see #343 and #351 for how to download the files yourself and update the paths so that it should work with whatever file names you choose. Let me know if that works for you!

@dakinggg dakinggg added the bug Something isn't working label Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants