Skip to content

Error when the export() is called through DISU object  #1220

@flydream0428

Description

@flydream0428

When the export() is called,
disu_sub.export(r'output/test_grid.shp')

The error below is received,
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_8752/1798900599.py in <module>
----> 1 disu_sub.export(r'output/test_grid.shp')

C:\Anaconda\envs\py3\lib\site-packages\flopy\pakbase.py in export(self, f, **kwargs)
    672         from flopy import export
    673 
--> 674         return export.utils.package_export(f, self, **kwargs)
    675 
    676     @staticmethod

C:\Anaconda\envs\py3\lib\site-packages\flopy\export\utils.py in package_export(f, pak, fmt, **kwargs)
    687     if isinstance(f, str) and f.lower().endswith(".shp"):
    688         shapefile_utils.model_attributes_to_shapefile(
--> 689             f, pak.parent, package_names=pak.name, **kwargs
    690         )
    691 

C:\Anaconda\envs\py3\lib\site-packages\flopy\export\shapefile_utils.py in model_attributes_to_shapefile(filename, ml, package_names, array_dict, **kwargs)
    320 
    321                     if a.array.shape == horz_shape:
--> 322                         array_dict[a.name] = a.array
    323                     else:
    324                         # array is not the same shape as the layer shape

TypeError: unhashable type: 'list'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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