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 in initialization #279

Closed
fdouglis opened this issue Mar 25, 2021 · 4 comments
Closed

error in initialization #279

fdouglis opened this issue Mar 25, 2021 · 4 comments

Comments

@fdouglis
Copy link

I have run into the following issue each time I've tried do the initial configuration of coldfront ... a missing CSV. Any suggestions?

FileNotFoundError: [Errno 2] No such file or directory: '/home/fdouglis/tools/venv/lib/python3.8/site-packages/coldfront/core/field_of_science/management/commands/data/field_of_science_data.csv

Full trace:

Operations to perform:
  Apply all migrations: admin, allocation, auth, contenttypes, django_q, field_of_science, grant, project, publication, research_output, resource, sessions, user
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying resource.0001_initial... OK
  Applying field_of_science.0001_initial... OK
  Applying project.0001_initial... OK
  Applying allocation.0001_initial... OK
  Applying allocation.0002_auto_20190718_1451... OK
  Applying allocation.0003_auto_20191018_1049... OK
  Applying django_q.0001_initial... OK
  Applying django_q.0002_auto_20150630_1624... OK
  Applying django_q.0003_auto_20150708_1326... OK
  Applying django_q.0004_auto_20150710_1043... OK
  Applying django_q.0005_auto_20150718_1506... OK
  Applying django_q.0006_auto_20150805_1817... OK
  Applying django_q.0007_ormq... OK
  Applying django_q.0008_auto_20160224_1026... OK
  Applying django_q.0009_auto_20171009_0915... OK
  Applying grant.0001_initial... OK
  Applying publication.0001_initial... OK
  Applying publication.0002_auto_20191223_1115... OK
  Applying publication.0003_auto_20200104_1700... OK
  Applying publication.0004_add_manual_publication_source... OK
  Applying research_output.0001_initial... OK
  Applying resource.0002_auto_20191017_1141... OK
  Applying sessions.0001_initial... OK
  Applying user.0001_initial... OK
Adding field of science ...
Traceback (most recent call last):
  File "/home/fdouglis/tools/venv/bin/coldfront", line 8, in <module>
    sys.exit(manage())
  File "/home/fdouglis/tools/venv/lib/python3.8/site-packages/coldfront/__init__.py", line 11, in manage
    execute_from_command_line(sys.argv)
  File "/home/fdouglis/tools/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/home/fdouglis/tools/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/fdouglis/tools/venv/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/fdouglis/tools/venv/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/home/fdouglis/tools/venv/lib/python3.8/site-packages/coldfront/core/utils/management/commands/initial_setup.py", line 14, in handle
    call_command('import_field_of_science_data')
  File "/home/fdouglis/tools/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 148, in call_command
    return command.execute(*args, **defaults)
  File "/home/fdouglis/tools/venv/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/home/fdouglis/tools/venv/lib/python3.8/site-packages/coldfront/core/field_of_science/management/commands/import_field_of_science_data.py", line 17, in handle
    with open(file_path, 'r') as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/home/fdouglis/tools/venv/lib/python3.8/site-packages/coldfront/core/field_of_science/management/commands/data/field_of_science_data.csv'```
@aebruno
Copy link
Member

aebruno commented Mar 25, 2021

@fdouglis Thanks for reporting this! Actually just fixed this in dce68da. Will be releasing a new version shortly.

@fdouglis
Copy link
Author

Aha, thanks. How long do you think it'll take for pip to have the new version? Should I grab from here instead?

@aebruno
Copy link
Member

aebruno commented Mar 25, 2021

Aha, thanks. How long do you think it'll take for pip to have the new version? Should I grab from here instead?

Just released v1.0.4 on pip. Should be good to go now. Give it a try and let us know this fixes your issue.

@fdouglis
Copy link
Author

Yup, @aebruno, it installed this time. I had tried simply downloading the CSV from the commit you mentioned, but that wasn't sufficient as a format had changed as well (wrong number of fields to unpack). but pip --upgrade did the trick.

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

2 participants