Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing 'PRISM_interval_vector.csv' after Syntax error #1

Open
Miracle-qi opened this issue Jun 10, 2023 · 1 comment
Open

Missing 'PRISM_interval_vector.csv' after Syntax error #1

Miracle-qi opened this issue Jun 10, 2023 · 1 comment

Comments

@Miracle-qi
Copy link

Miracle-qi commented Jun 10, 2023

When I run the RunFile.py and all the examples in run_experiments.sh,the following error happened without generating PRISM_interval_vector.csv as expected. I would greatly appreciate it if you could provide some guidance or information to help resolve this issue.

Error: Syntax error ("?", line 1, column 9).
Traceback (most recent call last):
File "RunFile.py", line 180, in
Ab.solve_iMDP()
File "/home/qi/Documents/DynAbs-main/core/abstraction.py", line 482, in solve_iMDP
self.loadPRISMresults(policy_file, vector_file)
File "/home/qi/Documents/DynAbs-main/core/abstraction.py", line 506, in loadPRISMresults
rewards_k0 = pd.read_csv(vector_file, header=None).iloc[self.mdp.head:].to_numpy()
File "/home/qi/.local/lib/python3.8/site-packages/pandas/util/_decorators.py", line 211, in wrapper
return func(*args, **kwargs)
File "/home/qi/.local/lib/python3.8/site-packages/pandas/util/_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
File "/home/qi/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 950, in read_csv
return _read(filepath_or_buffer, kwds)
File "/home/qi/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 605, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "/home/qi/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 1442, in init
self._engine = self._make_engine(f, self.engine)
File "/home/qi/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 1735, in _make_engine
self.handles = get_handle(
File "/home/qi/.local/lib/python3.8/site-packages/pandas/io/common.py", line 856, in get_handle
handle = open(
FileNotFoundError: [Errno 2] No such file or directory: '/home/qi/Documents/DynAbs-main/output/Ab_building_1room_06-11-2023_00-16-10/N=3200_0/PRISM_interval_vector.csv'

@tbadings
Copy link
Collaborator

My apologies for never replying to your issue. I had my notifications set wrongly, so I never got notified of your issue; sorry for that!

The line rewards_k0 = pd.read_csv(vector_file, header=None).iloc[self.mdp.head:].to_numpy() should read the results from PRISM back into Python. While I have not encountered this error myself before, I suspect that either this PRISM output file is corrupted, or something is wrong within Pandas.

If the error still persists, could you paste the content of PRISM_interval_vector.csv (located in the relevant output folder), and in addition let me know what Python package versions you used (e.g., using a pip list)?

That said, the code and the dependencies have changed quite a bit since, so it could also be that the issue has already been mitigated.

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

No branches or pull requests

2 participants