Skip to content

Cannot import outages #273

@knikolla

Description

@knikolla

CLI command to generate invoices gives out the following error

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/venv/lib/python3.12/site-packages/django/__main__.py", line 9, in <module>
    management.execute_from_command_line()
  File "/opt/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/opt/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/venv/lib/python3.12/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/venv/lib/python3.12/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.12/site-packages/coldfront_plugin_cloud/management/commands/calculate_storage_gb_hours.py", line 304, in handle
    process_invoice_row(
  File "/opt/venv/lib/python3.12/site-packages/coldfront_plugin_cloud/management/commands/calculate_storage_gb_hours.py", line 216, in process_invoice_row
    excluded_intervals_list = get_outages_for_service(resource_name)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.12/site-packages/coldfront_plugin_cloud/management/commands/calculate_storage_gb_hours.py", line 208, in get_outages_for_service
    return utils.load_outages_from_nerc_rates(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.12/site-packages/coldfront_plugin_cloud/utils.py", line 249, in load_outages_from_nerc_rates
    from nerc_rates import outages
ImportError: cannot import name 'outages' from 'nerc_rates' (/opt/venv/lib/python3.12/site-packages/nerc_rates/__init__.py)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions