-
-
Couldn't load subscription status.
- Fork 1
Open
Description
Describe the bug
Sometimes scmlv fails to compile when I use it with pandas>=2.0.
To Reproduce
Steps to reproduce the behavior:
- Prepare a log folder containing
negotiations.csvwithNonein theagreementcolumn (i.e. logs containing broken negotiations). - Run
scmlv show -f <log folder> Parse Erroroccurs, and the visualizer raisesTypeError
# Error of compilation
No tournament found ... reading world info
Parse Error logs
Did not find agent_stats
Did not find product_stats
Did not find world_stats
Did not find contracts
Did not find contract_stats
Did not find negotiations
Did not find offers
Did not find neg_stats
Did not find breaches
# Error from the visualizer
Traceback (most recent call last):
File "/Users/a4rcvv/Documents/projects/scml-repro/.venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "/Users/a4rcvv/Documents/projects/scml-repro/.venv/lib/python3.11/site-packages/scml_vis/presenter.py", line 1548, in <module>
main(folder)
File "/Users/a4rcvv/Documents/projects/scml-repro/.venv/lib/python3.11/site-packages/scml_vis/presenter.py", line 193, in main
products["product"].unique(),
~~~~~~~~^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
Expected behavior
scmlv can compile log files successfully.
System (please complete the following information):
scml-visversion: 0.3.1- Python version: 3.11
- OS: macOS 14.2
Additional context
One of the current workaround is to use pandas<2.0.0.
Pandas treats a string of "None" as NaN in default since 2.0.0(ref: pandas-dev/pandas#50286, https://pandas.pydata.org/docs/dev/whatsnew/v2.0.0.html).
But it seems that scmlv wants to treat "None" as "None" as a string at here. When I use pandas>=2.0, NaN may be provided to this function which causes an error.
Metadata
Metadata
Assignees
Labels
No labels