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

Pip install tom-antares error with tomtoolkit<2.14 #677

Closed
davner opened this issue Jul 27, 2023 · 1 comment · Fixed by TOMToolkit/tom_antares#35 · May be fixed by TOMToolkit/tom_antares#34
Closed

Pip install tom-antares error with tomtoolkit<2.14 #677

davner opened this issue Jul 27, 2023 · 1 comment · Fixed by TOMToolkit/tom_antares#35 · May be fixed by TOMToolkit/tom_antares#34
Assignees

Comments

@davner
Copy link
Contributor

davner commented Jul 27, 2023

If installing the tom-antares package after installing tomtoolkit, it will downgrade tomtoolkit to a version that does not work with a recent version of django causing an error when calling ./manage.py migrate. Error posted at end.

To fix, you must upgrade the tomtoolkit to the latest version. tom-antares works with the latest version, as discussed in PR TOMToolkit/tom_antares#35, and the setup.py needs to be updated.

A correction for the README, change Add tom_antares.antares.AntaresBroker to the... to Add tom_antares.antares.ANTARESBroker to the.... It must be all caps or else an error will occur. It is correct in the code block below that sentence.

Error report:

(gemdebug) msoraisam-ml1:mytom monika.soraisam$ ./manage.py migrate
registering new views: args: ('groups', <class 'tom_common.api_views.GroupViewSet'>, 'groups'), kwargs: {}
registering new views: args: ('targets', <class 'tom_targets.api_views.TargetViewSet'>, 'targets'), kwargs: {}
registering new views: args: ('targetextra', <class 'tom_targets.api_views.TargetExtraViewSet'>, 'targetextra'), kwargs: {}
registering new views: args: ('targetname', <class 'tom_targets.api_views.TargetNameViewSet'>, 'targetname'), kwargs: {}
Traceback (most recent call last):
  File "/Users/monika.soraisam/Desktop/tomdev/gemini_debug/mytom/./manage.py", line 22, in <module>
    main()
  File "/Users/monika.soraisam/Desktop/tomdev/gemini_debug/mytom/./manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/core/management/base.py", line 106, in wrapper
    res = handle_func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/core/management/commands/migrate.py", line 100, in handle
    self.check(databases=[database])
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/core/management/base.py", line 485, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/core/checks/registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/core/checks/urls.py", line 14, in check_url_config
    return check_resolver(resolver)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/core/checks/urls.py", line 24, in check_resolver
    return check_method()
           ^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/urls/resolvers.py", line 494, in check
    for pattern in self.url_patterns:
                   ^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/urls/resolvers.py", line 715, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
                       ^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/urls/resolvers.py", line 708, in urlconf_module
    return import_module(self.urlconf_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/monika.soraisam/Desktop/tomdev/gemini_debug/mytom/mytom/urls.py", line 19, in <module>
    path('', include('tom_common.urls')),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/urls/conf.py", line 38, in include
    urlconf_module = import_module(urlconf_module)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/tom_common/urls.py", line 40, in <module>
    path('observations/', include('tom_observations.urls', namespace='observations')),
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/urls/conf.py", line 38, in include
    urlconf_module = import_module(urlconf_module)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/tom_observations/urls.py", line 3, in <module>
    from tom_observations.views import (AddExistingObservationView, FacilityStatusView, ObservationCreateView,
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/tom_observations/views.py", line 26, in <module>
    from tom_dataproducts.forms import AddProductToGroupForm, DataProductUploadForm
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/tom_dataproducts/forms.py", line 48, in <module>
    class DataProductUploadForm(forms.Form):
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/tom_dataproducts/forms.py", line 60, in DataProductUploadForm
    widget=forms.ClearableFileInput(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/gemdebug/lib/python3.11/site-packages/django/forms/widgets.py", line 427, in __init__
    raise ValueError(
ValueError: ClearableFileInput doesn't support uploading multiple files.
@davner davner changed the title Pip install tom-antares error with tomtoolkit<=2.14 Pip install tom-antares error with tomtoolkit<2.14 Jul 28, 2023
@phycodurus phycodurus self-assigned this Jul 28, 2023
@phycodurus phycodurus transferred this issue from TOMToolkit/tom_antares Jul 28, 2023
@github-project-automation github-project-automation bot moved this to Backlog in TOM Toolkit Jul 28, 2023
@phycodurus phycodurus moved this from Backlog to In planning in TOM Toolkit Jul 28, 2023
@jchate6 jchate6 self-assigned this Jul 31, 2023
@github-project-automation github-project-automation bot moved this from In planning to Merged (to dev) in TOM Toolkit Aug 2, 2023
@jchate6 jchate6 reopened this Aug 2, 2023
@github-project-automation github-project-automation bot moved this from Merged (to dev) to In progress in TOM Toolkit Aug 2, 2023
@jchate6
Copy link
Contributor

jchate6 commented Aug 2, 2023

I believe this was addressed with TOM Antares Release 1.2.5

@jchate6 jchate6 closed this as completed Aug 2, 2023
@github-project-automation github-project-automation bot moved this from In progress to Merged (to dev) in TOM Toolkit Aug 2, 2023
@jchate6 jchate6 moved this from Merged (to dev) to Released in TOM Toolkit Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants