-
Notifications
You must be signed in to change notification settings - Fork 31
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
TypeError: 'escape_forward_slashes' is an invalid keyword argument for this function, when loading SpaCy 3.5 model (Python 3.8) #89
Comments
From the two reports, this sounds like something can go wrong with the What does If you create a brand new conda env and run only: conda install -c conda-forge spacy
spacy download it_core_news_sm can you load the model in the new env? |
Actually I didn't use conda too install spacy or srsly. I have a base environment and I'm using poetry to manage all packages. Poetry doesn't create a new environment, instead uses conda's base env. I'm trying with conda now. (btw, spacy 3.3.1 on python 3.7 was working fine. This problem started with python 3.8. Now it doesn't matter whether I use spacy 3.3.1 or 3.5.1, both fails with the same error message. |
What does And if you create a new conda env and reinstall your dependencies with poetry, what does I don't know for sure, but my best guess is that different install steps have installed srsly and something didn't get uninstalled or upgraded cleanly or there's an incompatible mix of pip and conda packages. If you want to keep the current base environment, you might try being really sure that you've uninstalled
and then start your project install (however you install spacy) again? |
|
Please copy and paste the exact output of |
A hack that worked for me was to just edit the _json_api.py file under srsly to not have the escape_forward_slashes keyword (i.e remove it from the line with the ujson.dumps() function call). If anyone needs a quick fix that doesn't use that keyword for their functionality, feel free to edit the file as a workaround lol. |
It really sounds like this might be a problem with a particular Can anyone provide more details about their environment, in particular the output of
|
I got the same error: Config validation error The output of the
I tried to install the 2.4.6 version, but it didn't work either. Also, I have the following libraries installed:
|
Thanks for the info! Several of us have tried to reproduce this in a conda environment with no luck, so I'm afraid we're still not quite sure what's going on. As far as I know the version of ujson vendored in Can you try running the
|
Thanks! So the What about the confection tests:
And if those pass, then the spacy tests:
And the |
I am having the exact same issue right now! Will do the test you mentioned for confection |
I hope we can get to the bottom of this. Any details about your environment and the code you're running would be appreciated! |
If there's nothing confidential about your environment, maybe the output of |
I've got this error. conda env export:
Guys, I don't know why, but now it's working. Seriously, I don't know what is happening. I mean, I run only these commands:
Then, the conda export. And now I try to run my experiments and everything is working as usual. |
Thanks, I could recreate the same conda env but I'm afraid I still couldn't reproduce this error. The next time it happens, could you check if changing your current working directory makes a difference? It's a bit of stab in the dark, but maybe there's a particular local python file/module that's affecting this? |
Thanks for your reply. How do I change my current working directory? I'm using WSL 2 and ubuntu 18.04 inside my VS Code. I'm thinking about re-create my conda environment and check if that's the problem. What do you think? |
Guys I have faced with same problem when I tried to run app inside docker. So I did some research and I think the problem is in ffmpeg. |
Thanks for the note! I can't figure out how ffmpeg would affect ujson, but maybe this indicates that the problem is somehow related to system libraries with the same symbols and not problems with the python module/packages directly. Would it be possible for you to share the basic configuration from your Dockerfile? |
This is what worked for me as well. Here's how I did it with a few commands: SITE_PACKAGES=$( pip show srsly | grep Location | sed 's/^Location: //g' )
JSON_API_FILE=$SITE_PACKAGES/srsly/_json_api.py
sed -i 's/, escape_forward_slashes=False//g' $JSON_API_FILE |
Since #83 is closed, I'm opening it again.
srsly
version is 2.4.6.ujson
installed, I tried uninstalling it but it didn't solve the issue.srrsly=2.4.3
in the same environment also gives the same error.The code to reproduce:
The full trace
The text was updated successfully, but these errors were encountered: