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

cannot download en_ewt_model.zip in running demo/pipeline_demo.py after cloning on my local #1

Closed
hayata-yamamoto opened this issue Jan 31, 2019 · 5 comments

Comments

@hayata-yamamoto
Copy link

Hi,
I have one trouble on demo script. After installing stanfordnlp from pip and cloning your repository on my local, I cannot run script demo/pipeline_demo.py to try your code.

Raised Error is below. Could you tell me solution of this problem.

Downloading models for: en_ewt
Download location: /Users/hayata.yamamoto/stanfordnlp_resources/en_ewt_models.zip
Traceback (most recent call last):
  File "demo/pipeline_demo.py", line 32, in <module>
    stanfordnlp.download(args.lang, args.models_dir, confirm_if_exists=True)
  File "/Users/hayata.yamamoto/anaconda3/envs/analytics/lib/python3.6/site-packages/stanfordnlp/utils/resources.py", line 134, in download
    download_ud_model(default_treebanks[download_label], resource_dir=resource_dir, confirm_if_exists=confirm_if_exists)
  File "/Users/hayata.yamamoto/anaconda3/envs/analytics/lib/python3.6/site-packages/stanfordnlp/utils/resources.py", line 101, in download_ud_model
    with open(download_file_path, 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/hayata.yamamoto/stanfordnlp_resources/en_ewt_models.zip'
@sebschu
Copy link
Member

sebschu commented Jan 31, 2019

You'll either have to create the directory stanfordnlp_resources in your home directory (this is the default directory for models) or specify a target directory for the models using the -d command line argument of pipeline_demo.py.

@yuhaozhang
Copy link
Member

yuhaozhang commented Jan 31, 2019

This is indeed a caveat of the download module. One temporary solution is, as @sebschu pointed out, to create the target model directory manually (mkdir ${model_dir} in bash) before you run the demo script. We'll fix this issue quickly with a v0.1.0.post1 release.

@hayata-yamamoto
Copy link
Author

hayata-yamamoto commented Jan 31, 2019

@sebschu @yuhaozhang
Thanks to your quick answers, I could download!

We'll fix this issue quickly with a v0.1.0.post1 release.

Splendid! I look forward next update!
Thanks a lot! :)

@manning
Copy link
Member

manning commented Jan 31, 2019

Can't it just be a 0.1.1 release, no?

@yuhaozhang
Copy link
Member

@manning Yes. This is already in a v0.1.1 release on PyPI.

@AngledLuffa AngledLuffa mentioned this issue Apr 27, 2021
AngledLuffa added a commit that referenced this issue Jul 13, 2022
AngledLuffa added a commit that referenced this issue Sep 1, 2023
AngledLuffa added a commit that referenced this issue Sep 6, 2023
AngledLuffa added a commit that referenced this issue Apr 11, 2024
… it easier to integrate with the Pipeline
AngledLuffa added a commit that referenced this issue Apr 11, 2024
… it easier to integrate with the Pipeline
AngledLuffa added a commit that referenced this issue Apr 11, 2024
… it easier to integrate with the Pipeline
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

4 participants