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

Could you tell me how to deal with this problem? #2

Open
wendongx opened this issue Sep 22, 2021 · 2 comments
Open

Could you tell me how to deal with this problem? #2

wendongx opened this issue Sep 22, 2021 · 2 comments

Comments

@wendongx
Copy link

When i run network.py,there will arise this problem.
!!!state_shape: (3, 300, 300)
FloorPlan211
FloorPlan11
FloorPlan312
FloorPlan411
FloorPlan312
FloorPlan211
Process Process-6:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/RL/multiprocessing_env.py", line 19, in worker
pim1, pim2, pim3,ob,g,shortest,pre_action= env.reset()
File "/home/RL/scene_loader.py", line 175, in reset
cidx=random.randint(0,n_points-1)
File "/usr/lib/python3.6/random.py", line 221, in randint
return self.randrange(a, b+1)
File "/usr/lib/python3.6/random.py", line 199, in randrange
raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (0,0, 0)
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/RL/multiprocessing_env.py", line 19, in worker
pim1, pim2, pim3,ob,g,shortest,pre_action= env.reset()
File "/home/RL/scene_loader.py", line 175, in reset
cidx=random.randint(0,n_points-1)
File "/usr/lib/python3.6/random.py", line 221, in randint
return self.randrange(a, b+1)
File "/usr/lib/python3.6/random.py", line 199, in randrange
raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (0,0, 0)
['Pillow', 'Laptop', 'Television', 'GarbageCan', 'Box', 'Bowl', 'Book', 'FloorLamp', 'Painting', 'Sofa']
['Pillow', 'Laptop', 'Television', 'GarbageCan', 'Box', 'Bowl', 'Book', 'FloorLamp', 'Painting', 'Sofa']
I run another eva1_checkpoint.py, some problems arised.
Loggingto/home/RL/.config/unity3d/Allen Institute for Artificial Intelligence/AI2-Thor/Player.log
test path: 1000
=> loaded checkpoint './checkpoint/best.ckpt' (global_t 90011)
FloorPlan22
['Toaster', 'Microwave', 'Fridge', 'CoffeeMaker', 'GarbageCan', 'Box', 'Bowl', 'Apple', 'Chair', 'DiningTable', 'Plate', 'Sink', 'SinkBasin']
Traceback (most recent call last):
File "/home/RL/eva1_checkpoint.py", line 297, in
slen=len(tenv.bc.shortest_plan(tenv.graph, start_agent,tenv.mygoal))
File "/home/RL/.local/lib/python3.6/site-packages/ai2thor/controller.py", line 1164, in shortest_plan
path=nx.shortest_path(graph,self.key_for_point(agent['position']),self.key_for_point(target['position']))
File "/home/RL/.local/lib/python3.6/site-packages/networkx/algorithms/shortest_paths/generic.py", line 170, in shortest_path
paths = nx.bidirectional_shortest_path(G, source, target)
File "/home/RL/.local/lib/python3.6/site-packages/networkx/algorithms/shortest_paths/unweighted.py", line 223, in bidirectional_shortest_path
raise nx.NodeNotFound(msg.format(source, target))
networkx.exception.NodeNotFound: Either source 0.750|2.250 or target -1.500|0.250 is not in G

Process finished with exit code 1

@ChenShuai-CA
Copy link

我也有同样的问题,networkx.exception.NodeNotFound: Either source 0.750|2.250 or target -1.500|0.250 is not in G,请问您解决了吗?

@wqynew
Copy link
Owner

wqynew commented Jul 22, 2022

您好,我之前没遇到过这个问题,我想这个可能和:(1)AI2-THOR version有关;(2)能不能通过加段代码,排除这两个位置(0.750|2.250 or target -1.500|0.250)来解决这个问题?

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

3 participants