You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.csv with None in the agreement column (i.e. logs containing broken negotiations).
Run scmlv show -f <log folder>
Parse Error occurs, and the visualizer raises TypeError
# 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-vis version: 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.
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.
The text was updated successfully, but these errors were encountered:
Describe the bug
Sometimes scmlv fails to compile when I use it with
pandas>=2.0
.To Reproduce
Steps to reproduce the behavior:
negotiations.csv
withNone
in theagreement
column (i.e. logs containing broken negotiations).scmlv show -f <log folder>
Parse Error
occurs, and the visualizer raisesTypeError
Expected behavior
scmlv can compile log files successfully.
System (please complete the following information):
scml-vis
version: 0.3.1Additional 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.The text was updated successfully, but these errors were encountered: