ID 349857 - GeoEntity make Error when copying channels from an msf file in certain cases

Follow

Problem summary
GeoEntity make Error when copying channels from an msf file in certain cases

Customer reported version
4.1v2
Customer reported platform
centos7

Steps to reproduce

1) Open Mari

2) Extract the attached .MSF file locally

3) In the Python Console, run the below script and substitute your path
 


msfPath = '/path/to/session.msf'uvIndex = 0dstUvIndex = 1mariDstGeo = mari.geo.find('plane1')uvIndexMap = {uvIndex : [dstUvIndex]}dstGeo = mari.session.types.GeoEntity.fromMariObject(mariDstGeo, None)srcProj = mari.session.types.Project.fromMSF(msfPath)srcGeo = srcProj.geoEntities[0]copiedChannels = dstGeo.copyChannels(srcGeo.channels, uvIndexMap)dstGeo.make()



4) Result (4.1v2, 3.4v1)
 


Traceback (most recent call last):  File "<string>", line 12, in <module>  File "C:/Program Files/Mari4.1v1/Bundle/Media/Scripts\Mari\session\types\geo_entity.py", line 812, in make    finishedCallback=finishedCallback  File "C:/Program Files/Mari4.1v1/Bundle/Media/Scripts\Mari\session\types\geo_entity.py", line 896, in makeChannels    channel.makeLayers(selectedLayers=selectedLayers, finishedCallback=finishedCallback)  File "C:/Program Files/Mari4.1v1/Bundle/Media/Scripts\Mari\session\types\layer_stack.py", line 199, in makeLayers    layer.make(finishedCallback=finishedCallback)  File "C:/Program Files/Mari4.1v1/Bundle/Media/Scripts\Mari\session\types\layer.py", line 560, in make    self.createMariObject()  File "C:/Program Files/Mari4.1v1/Bundle/Media/Scripts\Mari\session\types\sibling_shared_layer.py", line 76, in createMariObject    if self.siblingLayer.parentChannel.mariObject is None:AttributeError: 'NoneType' object has no attribute 'mariObject'

5) Result (4.0v4, 3.3v1)
 


Traceback (most recent call last):  File "<string>", line 11, in <module>  File "C:/Program Files/Mari4.0v4/Bundle/Media/Scripts\Mari\session\types\geo_entity.py", line 326, in copyChannels    channel.remapPatchUvIndexes(uvIndexesMap)  File "C:/Program Files/Mari4.0v4/Bundle/Media/Scripts\Mari\session\types\channel.py", line 394, in remapPatchUvIndexes    mappedPatches[targetIndex] = self.patches[key]KeyError: 0


Workaround
Unknown. 

Reproduced by support
This bug has been reproduced in:
Mari 4.1v2 - Win 7, CentOS 7.5
Mari 4.1v1 
Mari 3.4v1 -Win 7, CentOS 7.5


Unable to reproduce bug in:
Mari 4.0v4 - Gives Python Error above
Mari 3.3v1 - Gives Python Error above
Mari 3.1v1 - Gives Python Error above
 

Expected behaviour
Script should be successful in loading the .MSF

Actual behaviour
Session is not loaded, error returned

    We're sorry to hear that

    Please tell us why