simvue-io / simvue-io/simvue-cli
simvue run list gives a datetime error
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Description of Bug
For some reason, occasionally when doing simvue run list, I get:
(.venbv): ~/Documents/sandbox/simvue$ simvue run list
Traceback (most recent call last):
File "/home/wk9874/.local/bin/simvue", line 7, in <module>
sys.exit(simvue())
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/click/core.py", line 1462, in __call__
return self.main(*args, **kwargs)
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/click/core.py", line 1383, in main
rv = self.invoke(ctx)
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/click/core.py", line 1850, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/click/core.py", line 1850, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/click/core.py", line 1246, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/click/core.py", line 814, in invoke
return callback(*args, **kwargs)
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/click/decorators.py", line 34, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/simvue_cli/cli/__init__.py", line 464, in list_runs
table = create_objects_display(
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/simvue_cli/cli/display.py", line 189, in create_objects_display
sorted(objects, key=lambda x: getattr(x[1], "created", x[1].id), reverse=True)
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/simvue_cli/cli/display.py", line 189, in <lambda>
sorted(objects, key=lambda x: getattr(x[1], "created", x[1].id), reverse=True)
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/simvue/api/objects/base.py", line 65, in _wrapper
return member_func(self)
File "/home/wk9874/.local/pipx/venvs/simvue-cli/lib/python3.10/site-packages/simvue/api/objects/run.py", line 454, in created
datetime.datetime.strptime(_created, DATETIME_FORMAT) if _created else None
File "/usr/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/lib/python3.10/_strptime.py", line 352, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: +00:00
Expected behavior
A list of run IDs
Actual Behaviour
Error thrown
Screenshots
If applicable, add screenshots to help explain your problem.
Setup
- OS: Ubuntu 22.04
- Python Version 3.10
- Simvue Python API Version: 2.2.2
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with simvue/api/objects/run.py and the created property shown in the traceback, then inspect simvue_cli/cli/display.py where runs are sorted. Reproduce with simvue run list using a run whose timestamp includes the reported timezone suffix; done means the command lists run IDs without the datetime parsing error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100