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

using download_knesset_datapackage should work after running datapackage test #11

Open
alonisser opened this issue Jul 8, 2017 · 3 comments
Labels

Comments

@alonisser
Copy link
Collaborator

Looks like there is symbolink link for the tests folder? This looks like a mistake I guess?

Traceback:

  File "/home/alonisser/Projects/knesset-data-django/knesset_data_django/common/scrapers/root_datapackage_scraper.py", line 127, in load_from_file
    shutil.rmtree(self.datapackage_dir)
  File "/usr/lib/python2.7/shutil.py", line 232, in rmtree
    onerror(os.path.islink, path, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 230, in rmtree
    raise OSError("Cannot call rmtree on a symbolic link")
OSError: Cannot call rmtree on a symbolic link
(knesset-data-django) ➜  knesset-data-django git:(master) ls data/datapackage
committee-meetings.csv  committee-meetings-protocols  committee-meetings-protocols.csv  committees.csv  members.csv
(knesset-data-django) ➜  knesset-data-django git:(master) ls data/datapackage -al
lrwxrwxrwx 1 alonisser alonisser 89 Jul  8 11:16 data/datapackage -> /home/alonisser/Projects/knesset-data-django/knesset_data_django/common/tests/datapackage
@OriHoch
Copy link
Contributor

OriHoch commented Jul 9, 2017

the datapackage test made a symbolic link there

but it's not running now, so it shouldn't happen again

you can just delete the data/datapackage symlink

(knesset-data-django) ori@ori-ThinkPad-T560:~/knesset-data-django$ ll data
total 12
drwxr-xr-x 2 ori ori 4096 Jul  8 10:38 ./
drwxr-xr-x 7 ori ori 4096 Jul  8 10:54 ../
-rw-r--r-- 1 ori ori    0 Jul  8 10:30 .gitkeep
lrwxrwxrwx 1 ori ori   74 Jul  8 10:38 datapackage -> /home/ori/knesset-data-django/knesset_data_django/common/tests/datapackage/

@OriHoch OriHoch changed the title using download_knesset_datapackage command with --url and --scrape fails using download_knesset_datapackage command with --url and --scrape should work after running unit tests Jul 9, 2017
@OriHoch
Copy link
Contributor

OriHoch commented Jul 9, 2017

reproduction

  • run the datapackage test (it's skipped at the moment)
  • see that it made a symbolic link at data/datapackage
  • now run download knesset datapackage e.g. ./manage.py download_knesset_datapackage --url https://s3.amazonaws.com/knesset-data/datapackage_last_5_days_2017-07-08.zip --scrape

expected

  • should download and scrape from the datapackage

actual

  • OSError: Cannot call rmtree on a symbolic link

@OriHoch OriHoch changed the title using download_knesset_datapackage command with --url and --scrape should work after running unit tests using download_knesset_datapackage should work after running datapackage test Jul 9, 2017
@OriHoch OriHoch removed their assignment Jul 9, 2017
@alonisser
Copy link
Collaborator Author

alonisser commented Jul 9, 2017 via email

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

No branches or pull requests

2 participants