Skip to content

ValueError: invalid literal for int() with base 10: '' (api/utils.py:216) #320

Description

@alanbchristie

While testing an experimental stack I stumbled upon numerous ValueError exceptions from the apu/util.py module while trying to display vectors. The full stack trace is: -

Internal Server Error: /viewer/img_from_smiles/
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/base.py", line 179, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/code/viewer/views.py", line 1335, in img_from_smiles
    return get_params(smiles, request)
  File "/code/api/utils.py", line 285, in get_params
    request.GET["atom_indices"], mol
  File "/code/api/utils.py", line 216, in parse_atom_ids
    atom_ids.append(int(spl_list[i]))
ValueError: invalid literal for int() with base 10: ''

Metadata

Metadata

Assignees

No one assigned

    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