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

RuntimeError: Json parsing error #168

Open
666github100 opened this issue Apr 15, 2023 · 3 comments
Open

RuntimeError: Json parsing error #168

666github100 opened this issue Apr 15, 2023 · 3 comments

Comments

@666github100
Copy link

I encountered a very strange thing. The first time I reproduced the code, I did not encounter this error, but the second time, I encountered:
Traceback (most recent call last):
File "/home/user/.conda/envs/traffic/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/user/.conda/envs/traffic/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/data1/user/colight/pipeline.py", line 189, in generator_wrapper
best_round=best_round
File "/data1/user/colight/generator.py", line 31, in init
self.env.reset()
File "/data1/user/colight/anon_env.py", line 822, in reset
self.eng = engine.Engine(new_path, thread_num=1)
RuntimeError: Json parsing error

I feel very puzzled. I have looked at the homepage of cityflow ,and the configuration file for cityflow.Engine() should be right. Why does it indicate 'RuntimeError: Json parsing error'? Does any friend help me ?I would appreciate it !

@zhc134
Copy link
Member

zhc134 commented Apr 15, 2023

can you check the the value of "new_path" and check if the json file is valid or not?

@666github100
Copy link
Author

thanks very much, in the code,new_path=os.path.join(self.path_to_work_directory,"cityflow.config"),it is a file,and I checked the directory is right ,and I have already checked that the json file is valid.So do you know why I encountered the question?(the code is recommended to run under docker,but I don't use docker,is this the original cause?)I would appreciate it if you could help me!

@zhc134
Copy link
Member

zhc134 commented Apr 23, 2023

The issue shouldn't be related to Docker. For now, the only reason I can think of is the presence of some format disruption or unexpected fields in the JSON configuration file.

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