Skip to content

Conversation

@Czaki
Copy link
Collaborator

@Czaki Czaki commented Oct 20, 2025

Time to time we get a 500 error on conda fail:

 Traceback with variables (most recent call last):
  File "/home/runner/work/weather-report/weather-report/src/napari_dashboard/api_update.py", line 42, in <module>
    main()
      __loader__ = _frozen_importlib_external.SourceFileLoader(name='traceback_with_variables.main', path='/home/runner/work/weather-report/weather-report/.venv/lib/python3.12/site-packages/traceback_with_variables/main.py')
      __builtins__ = {'__name__': 'builtins', '__doc__': 'Built-in functions, types, exceptions, and other objects.
      
      This module provides direct access to all 'built-in'
      identifiers of Python; for example, builtins.len is
      the full name for the built-in function len().
      
      This module is not normally accessed explicitly by most
      applications, but can be useful in modules that provide
      objects with the same name as a built-in value, but in
      which the built-in of that name is also needed.', '__package__': '', '__loader__': _frozen_importlib.BuiltinImporter, '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), '__build_class__': <built-in function __build_class...n, Zope Corporation, the Python Software
          Foundation, and a cast of thousands for supporting Python
          development.  See www.python.org for more information., 'license': Type license() to see the full license text, 'help': Type help() for interactive help, or help(object) for help about object.}
      __package__ = None
      __spec__ = None
      __cached__ = None
      __name__ = '__main__'
      __file__ = '/home/runner/work/weather-report/weather-report/src/napari_dashboard/api_update.py'
      __doc__ = '
      This module provides a command line interface to update the database and upload it to Google Drive.
      '
      annotations = _Feature((3, 7, 0, 'beta', 1), None, 16777216)
      argparse = <module 'argparse' from '/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py'>
      Path = pathlib.Path
      db_update_main = <function main at 0x7fa1e469a020>
      COMPRESSED_DB = 'dashboard.db.bz2'
      DB_PATH = 'dashboard.db'
      compress_file = <function compress_file at 0x7fa1e3d807c0>
      fetch_database = <function fetch_database at 0x7fa1e3d80900>
      upload_db_dump = <function upload_db_dump at 0x7fa1e3d805e0>
      main = <function main at 0x7fa1e8182340>
  File "/home/runner/work/weather-report/weather-report/src/napari_dashboard/api_update.py", line 33, in main
    updated = db_update_main([str(args.db_path)])
      args = Namespace(db_path=PosixPath('dashboard.db'))
      parser = ArgumentParser(prog='api_update.py', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
  File "/home/runner/work/weather-report/weather-report/src/napari_dashboard/db_update/__main__.py", line 80, in main
    save_conda_download_information(session)
      args = Namespace(db_path=PosixPath('dashboard.db'))
      parser = ArgumentParser(prog='api_update.py', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
      engine = Engine(sqlite:////home/runner/work/weather-report/weather-report/dashboard.db)
      session = sqlalchemy.orm.session.Session(autobegin=True, autoflush=True, bind=Engine(sqlite:////home/runner/work/weather-report/weather-report/dashboard.db), enable_baked_queries=True, expire_on_commit=True, hash_key=1, identity_map=sqlalchemy.orm.identity.WeakInstanceDict(-), join_transaction_mode='conditional_savepoint', twophase=False)
  File "/home/runner/work/weather-report/weather-report/src/napari_dashboard/db_update/conda.py", line 48, in save_conda_download_information
    response = requests_get("https://api.napari.org/api/conda")
      session = sqlalchemy.orm.session.Session(autobegin=True, autoflush=True, bind=Engine(sqlite:////home/runner/work/weather-report/weather-report/dashboard.db), enable_baked_queries=True, expire_on_commit=True, hash_key=1, identity_map=sqlalchemy.orm.identity.WeakInstanceDict(-), join_transaction_mode='conditional_savepoint', twophase=False)
      limit = 10
  File "/home/runner/work/weather-report/weather-report/src/napari_dashboard/utils.py", line 13, in requests_get
    raise RuntimeError(f"Failed to get data from the server for {url}")
      url = 'https://api.napari.org/api/conda'
      depth = 10
      _ = 9
      res = <Response [500]>
builtins.RuntimeError: Failed to get data from the server for https://api.napari.org/api/conda

It looks like we hit moments where conda is not properly working.
This PR increases the time between retries to give more time for the server to get working.

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

Successfully merging this pull request may close these issues.

2 participants