ID 353203 - An OSError is returned when exporting a session via mari.session.exportSession()

Follow

Problem summary
An OSError is returned when exporting a session via mari.session.exportSession().

Customer reported version
4.0v4
Customer reported platform
centos7

Steps to reproduce

1) Open the affected archive

2) In the Python Console, run the following

exportDir = '/tmp/bandage'
geo = mari.geo.find('Bandage')
patch = geo.patch(50)
mari.session.exportSession(exportDir, geoEntities=[geo],
geoPatches=[patch], projectors=[] )

3) An OS Error is returned

Traceback (most recent call last):
File "<string>", line 5, in <module>
File /path/to/session/__init__.py", line 410, in exportSession
finishedCallback=finishedCallback).start()
File "/path/to/export_session.py", line 493, in start
os.makedirs(nodegraphExportSubDir)
File "/path/to/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 17] File exists: '/path to file/{8452e952-eb7e-4013-b378-a2a006502275}'

Workaround
Unknown. 

Reproduced by support
Mari 4.0v4 - Win 10, CentOS 7.5
Mari 4.0v1
Mari 3.3v1
Mari 3.2v1 - Win 10, CentOS 7.5

Earliest version tested
Last working version - Mari 3.1v3

Expected behaviour
The script should run with no errors and export the session images

Actual behaviour
An OS Error is returned in the Python Console

    We're sorry to hear that

    Please tell us why