Skip to content

TypeError: GltfPrimitive.__init__() got an unexpected keyword argument 'normals' #199

Description

@imranrajjad

the current main branch is broken because it is using the latest py3dtiles package https://github.com/VCityTeam/py3dtilers/blob/master/setup.py#L19


  File "c:\ifc_work\py3dtilers\py3dtilers\GeojsonTiler\GeojsonTiler.py", line 193, in main
    tileset = geojson_tiler.from_geojson_directory(properties, geojson_tiler.args.is_roof, geojson_tiler.args.add_color, geojson_tiler.args.keep_properties)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\ifc_work\py3dtilers\py3dtilers\GeojsonTiler\GeojsonTiler.py", line 177, in from_geojson_directory
    return self.create_tileset_from_feature_list(objects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\ifc_work\py3dtilers\py3dtilers\Common\tiler.py", line 252, in create_tileset_from_feature_list
    return self.create_tileset_from_groups(groups, extension_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\ifc_work\py3dtilers\py3dtilers\Common\tiler.py", line 271, in create_tileset_from_groups
    return FromGeometryTreeToTileset.convert_to_tileset(tree, self.args, extension_name, self.get_output_dir(), with_normals=with_normals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\ifc_work\py3dtilers\py3dtilers\Common\tileset_creation.py", line 48, in convert_to_tileset
    root_tile.add_child(FromGeometryTreeToTileset.__create_tile(root_node, offset, extension_name, output_dir, with_normals))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\ifc_work\py3dtilers\py3dtilers\Common\tileset_creation.py", line 113, in __create_tile
    tile.tile_content = FromGeometryTreeToTileset.__create_tile_content(feature_list, extension_name, node.has_texture(), node.downsample_factor, with_normals)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\ifc_work\py3dtilers\py3dtilers\Common\tileset_creation.py", line 162, in __create_tile_content
    primitives = FromGeometryTreeToTileset.__group_by_material_index(feature_list, with_texture, downsample_factor, with_normals)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\ifc_work\py3dtilers\py3dtilers\Common\tileset_creation.py", line 236, in __group_by_material_index
    gltf_primitives.append(GltfPrimitive(points, normals=normals, uvs=uvs, batchids=batchids, additional_attributes=additional_attributes, texture_uri=primitive['texture_uri'], material=primitive['material']))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: GltfPrimitive.__init__() got an unexpected keyword argument 'normals'

Possible Solution:

Change the https://github.com/VCityTeam/py3dtilers/blob/master/setup.py#L19 to use an older version of py3dtiles

py3dtiles @ git+https://gitlab.com/py3dtiles/py3dtiles@v9.0.0

and reinstall

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions