-
Notifications
You must be signed in to change notification settings - Fork 173
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
TypeError: cannot unpack non-iterable Phase object #122
Comments
Please check the naming of your intersection 'edges' or roads in sumo, |
Hi,i checked my sumo, and theres no edge named with an underscore. And i try the provided
file "atlanta_sumo.net.xml" .the issue also appears. That wonders me. Could you please give me more guidance? thanks a lot~
------------------ 原始邮件 ------------------
发件人: "cityflow-project/CityFlow" ***@***.***>;
发送时间: 2021年4月3日(星期六) 晚上6:38
***@***.***>;
***@***.******@***.***>;
主题: Re: [cityflow-project/CityFlow] TypeError: cannot unpack non-iterable Phase object (#122)
Please check the naming of your intersection 'edges' or roads in sumo,
if the name of an edge is with an underscore eg edge_1 , the issue appears.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
The edges naming in that file include underscore;
if you replace the underscore by another character or remove it, it will work. |
Hi bro. thanks a lot for your guidance. and i try but i still failed by replacing the underscore in name of edges.
finally i try to replace these code in converter.py
for phase,duration in tls_dict[nodeid]._programs['0']._phases:
lane_list = []
for i,alpha in enumerate(phase):
if (alpha == 'G' or alpha == 'g') and i in G_to_lane_dict.keys():
by
for phase in tls_dict[nodeid]._programs['0']._phases:
lane_list = []
duration=phase.duration
for alpha in enumerate(phase.state):
if (alpha == 'G' or alpha == 'g') and i in G_to_lane_dict.keys():
and it works.
i dont know if this problem is related to the version of python.because i use python3. hope it will be useful to you.
------------------ 原始邮件 ------------------
发件人: "cityflow-project/CityFlow" ***@***.***>;
发送时间: 2021年4月8日(星期四) 下午4:08
***@***.***>;
***@***.******@***.***>;
主题: Re: [cityflow-project/CityFlow] TypeError: cannot unpack non-iterable Phase object (#122)
The edges naming in that file include underscore;
'''
''''
if you replace the underscore by another character or remove it, it will work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks! |
Welcome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi bro.i meet another problem when i transfer the sumo map .xml to the cityflow map .json.it says TypeError: cannot unpack non-iterable Phase object when the convert.py process the function named "node_to_intersection".the same problem with the examples file atlanta_sumo.net.xml. i dont know if i get something wrong?
The text was updated successfully, but these errors were encountered: