allenai / allenai/Holodeck

TypeError: expected str, bytes or os.PathLike object, not NoneType

Aperta
#93 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
570
Fork
66
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

During scene generation in Holodeck, after the THOR Unity build download completes (thor-Linux64-3213d486cd09bcbafce33561997355983bdf8d1a.zip), the pipeline calls generate_small_objects() to place small assets. This triggers the creation of an AI2-THOR Controller instance.

Inside the Controller, the start() method attempts to launch Unity via subprocess.Popen. However, one of the arguments passed—either the Unity executable path or an environment variable—is None. When Python’s os.fsencode() tries to convert it to bytes, it raises a TypeError:
`TypeError: expected str, bytes or os.PathLike object, not NoneType`

The following is:

Image

```
AI: The used floor capacity of living room is 9.6m^2, which is less than 80% of the total floor capacity 19m^2.

AI: Here is the object selection plan:
{'living room': {'sectional_sofa': {'description': 'large l-shaped sectional sofa in neutral grey color', 'location': 'floor', 'size': [300, 200, 85], 'quantity': 1, 'variance_type': 'same', 'objects_on_top': [{'object_name': 'pillow', 'quantity': 6, 'variance_type': 'varied'}, {'object_name': 'throw blanket', 'quantity': 2, 'variance_type': 'varied'}, {'object_name': 'magazine', 'quantity': 3, 'variance_type': 'varied'}, {'object_name': 'tv remote', 'quantity': 1, 'variance_type': 'same'}], 'object_name': 'sectional_sofa'}, 'armchair': {'description': 'comfortable single armchair in matching grey color', 'location': 'floor', 'size': [100, 100, 85], 'quantity': 2, 'variance_type': 'same', 'objects_on_top': [{'object_name': 'small pillow', 'quantity': 2, 'variance_type': 'varied'}, {'object_name': 'lap blanket', 'quantity': 2, 'variance_type': 'same'}], 'object_name': 'armchair'}, 'coffee_table': {'description': 'modern rectangular coffee table with a glass top', 'location': 'floor', 'size': [140, 70, 45], 'quantity': 1, 'variance_type': 'same', 'objects_on_top': [{'object_name': 'coffee table book', 'quantity': 3, 'variance_type': 'varied'}, {'object_name': 'candle holder', 'quantity': 2, 'variance_type': 'same'}, {'object_name': 'small plant', 'quantity': 2, 'variance_type': 'varied'}, {'object_name': 'remote control', 'quantity': 1, 'variance_type': 'same'}, {'object_name': 'coaster set', 'quantity': 1, 'variance_type': 'same'}], 'object_name': 'coffee_table'}, 'tv_stand': {'description': 'sleek wooden tv stand with storage compartments', 'location': 'floor', 'size': [200, 50, 60], 'quantity': 1, 'variance_type': 'same', 'objects_on_top': [{'object_name': '55 inch tv', 'quantity': 1, 'variance_type': 'same'}, {'object_name': 'speaker', 'quantity': 2, 'variance_type': 'same'}, {'object_name': 'remote control for tv', 'quantity': 2, 'variance_type': 'varied'}, {'object_name': 'gaming console', 'quantity': 1, 'variance_type': 'same'}, {'object_name': 'photo frame', 'quantity': 3, 'variance_type': 'varied'}], 'object_name': 'tv_stand'}, 'bookshelf': {'description': 'tall wooden bookshelf with multiple compartments', 'location': 'floor', 'size': [120, 40, 220], 'quantity': 1, 'variance_type': 'same', 'objects_on_top': [{'object_name': 'book', 'quantity': 40, 'variance_type': 'varied'}, {'object_name': 'photo frame', 'quantity': 6, 'variance_type': 'varied'}, {'object_name': 'trophy', 'quantity': 5, 'variance_type': 'varied'}, {'object_name': 'decorative item', 'quantity': 5, 'variance_type': 'varied'}], 'object_name': 'bookshelf'}, 'cabinet': {'description': 'modern white storage cabinet', 'location': 'floor', 'size': [180, 45, 100], 'quantity': 1, 'variance_type': 'same', 'objects_on_top': [{'object_name': 'table lamp', 'quantity': 2, 'variance_type': 'varied'}, {'object_name': 'decorative bowl', 'quantity': 1, 'variance_type': 'same'}, {'object_name': 'vase with flowers', 'quantity': 1, 'variance_type': 'same'}, {'object_name': 'small artwork', 'quantity': 2, 'variance_type': 'varied'}], 'object_name': 'cabinet'}, 'painting': {'description': 'large abstract painting, vibrant colors', 'location': 'wall', 'size': [150, 180, 5], 'quantity': 1, 'variance_type': 'same', 'objects_on_top': [], 'object_name': 'painting'}, 'wall_shelf': {'description': 'floating wooden wall shelf for decor and storage', 'location': 'wall', 'size': [130, 30, 30], 'quantity': 2, 'variance_type': 'same', 'objects_on_top': [{'object_name': 'small plant', 'quantity': 3, 'variance_type': 'varied'}, {'object_name': 'decorative figurine', 'quantity': 3, 'variance_type': 'varied'}, {'object_name': 'framed photo', 'quantity': 4, 'variance_type': 'varied'}, {'object_name': 'mini sculpture', 'quantity': 2, 'variance_type': 'varied'}], 'object_name': 'wall_shelf'}, 'side_table': {'description': 'small wooden side table', 'location': 'floor', 'size': [50, 50, 60], 'quantity': 2, 'variance_type': 'same', 'objects_on_top': [{'object_name': 'table lamp', 'quantity': 2, 'variance_type': 'same'}, {'object_name': 'coaster', 'quantity': 4, 'variance_type': 'varied'}, {'object_name': 'small plant', 'quantity': 1, 'variance_type': 'same'}, {'object_name': 'remote control', 'quantity': 1, 'variance_type': 'same'}, {'object_name': 'magazine', 'quantity': 2, 'variance_type': 'varied'}], 'object_name': 'side_table'}, 'ottoman': {'description': 'leather storage ottoman', 'location': 'floor', 'size': [80, 80, 45], 'quantity': 1, 'variance_type': 'same', 'objects_on_top': [{'object_name': 'tray', 'quantity': 1, 'variance_type': 'same'}, {'object_name': 'magazine', 'quantity': 2, 'variance_type': 'varied'}, {'object_name': 'cup', 'quantity': 1, 'variance_type': 'same'}], 'object_name': 'ottoman'}, 'console_table': {'description': 'slim console table for entryway or behind sofa', 'location': 'floor', 'size': [150, 40, 80], 'quantity': 1, 'variance_type': 'same', 'objects_on_top': [{'object_name': 'table lamp', 'quantity': 2, 'variance_type': 'varied'}, {'object_name': 'key bowl', 'quantity': 1, 'variance_type': 'same'}, {'object_name': 'decorative books', 'quantity': 2, 'variance_type': 'varied'}, {'object_name': 'candle', 'quantity': 2, 'variance_type': 'varied'}], 'object_name': 'console_table'}}}
plan for living room: ### High-Level Design Strategy

To create a functional and aesthetically pleasing living room, I will follow a few key steps:

1. **Start with Larger Items**: Begin by placing the larger anchor pieces like the sectional sofa and the TV stand. This will help shape the primary layout of the room.
2. **Edge-Centric Layout**: Given the preference for placing objects at the edge, I will position most items along the room's periphery to maximize center space.
3. **Functional Groupings**: Create functional zones like the seating area around the coffee table and entertainment area with the TV stand and sectional sofa.
4. **Balanced Distribution**: Ensure objects are balanced around the space to avoid clustering too many items in one area.
5. **Alignment for Similar Objects**: Align similar items like armchairs or side tables to create visual harmony.
6. **Iterative Dependence**: Place each object iteratively, ensuring each new item’s placement complements previously placed items.

### Constraints for Each Object

sectional_sofa-0 | edge
tv_stand-0 | edge | in front of, sectional_sofa-0 | center aligned, sectional_sofa-0 | far, sectional_sofa-0
coffee_table-0 | middle | in front of, sectional_sofa-0 | center aligned, sectional_sofa-0 | near, sectional_sofa-0
armchair-0 | middle | around, coffee_table-0 | near, coffee_table-0 | face to, coffee_table-0
armchair-1 | middle | around, coffee_table-0 | near, coffee_table-0 | face to, coffee_table-0
cabinet-0 | edge | far, tv_stand-0 | side of, tv_stand-0
side_table-0 | edge | near, sectional_sofa-0 | side of, sectional_sofa-0
side_table-1 | edge | near, sectional_sofa-0 | side of, sectional_sofa-0
console_table-0 | edge | far, sectional_sofa-0 | side of, sectional_sofa-0
bookshelf-0 | edge | far, sectional_sofa-0 | side of, sectional_sofa-0
ottoman-0 | middle | around, coffee_table-0 | near, coffee_table-0 | face to, coffee_table-0
Time limit reached.
Time taken: 30.08130717277527
Number of solutions found: 25

wall object constraint plan for living room:
painting-0 | above, sofa-0 | 160
wall_shelf-0 | above, console_table-0 | 150
wall_shelf-1 | above, console_table-0 | 150
Time limit reached.
Time taken: 5.013270854949951
thor-Linux64-3213d486cd09bcbafce33561997355983bdf8d1a.zip: [ 100% 9.1 MiB/s] of 795.MB
Traceback (most recent call last):
File "/root/autodl-tmp/Holodeck/main.py", line 160, in
generate_single_scene(args)
File "/root/autodl-tmp/Holodeck/main.py", line 26, in generate_single_scene
args.model.generate_scene(
File "/root/autodl-tmp/Holodeck/ai2holodeck/generation/holodeck.py", line 329, in generate_scene
scene = self.generate_small_objects(scene, used_assets=used_assets)
File "/root/autodl-tmp/Holodeck/ai2holodeck/generation/holodeck.py", line 228, in generate_small_objects
controller = self.small_object_generator.start_controller(
File "/root/autodl-tmp/Holodeck/ai2holodeck/generation/small_objects.py", line 297, in start_controller
controller = Controller(
File "/root/miniconda3/envs/holodeck/lib/python3.10/site-packages/ai2thor/controller.py", line 547, in __init__
self.start(
File "/root/miniconda3/envs/holodeck/lib/python3.10/site-packages/ai2thor/controller.py", line 1545, in start
self._start_unity_thread(env, width, height, unity_params, image_name)
File "/root/miniconda3/envs/holodeck/lib/python3.10/site-packages/ai2thor/controller.py", line 1246, in _start_unity_thread
self.server.unity_proc = proc = subprocess.Popen(
File "/root/miniconda3/envs/holodeck/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/root/miniconda3/envs/holodeck/lib/python3.10/subprocess.py", line 1783, in _execute_child
env_list.append(k + b'=' + os.fsencode(v))
File "/root/miniconda3/envs/holodeck/lib/python3.10/os.py", line 811, in fsencode
filename = fspath(filename) # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not NoneType

```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.