fix again

This commit is contained in:
Mario Voigt 2020-09-11 15:57:49 +02:00
parent 9386da7b5a
commit 2f05ec1977

View File

@ -33,8 +33,8 @@ from subprocess import Popen, PIPE
import shutil import shutil
from shutil import which from shutil import which
from pathlib import Path from pathlib import Path
#from mimetypes import MimeTypes from mimetypes import MimeTypes
#import urllib.request as urllib import urllib.request as urllib
#ezdxf related imports #ezdxf related imports
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
@ -227,6 +227,16 @@ class DXFDWGImport(inkex.Effect):
if os.name != 'nt': if os.name != 'nt':
inkex.utils.debug("If the error message above contains a warning about wrong/missing Qt version please install the required version. You can get the installer from 'https://download.qt.io/archive/qt/'. Sadly you will need to create a free account to install. After installation please configure the shell script '/usr/bin/ODAFileConverter' to add a preceding line with content similar to 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Qt5.14.2/5.14.2/gcc_64/lib/'.") inkex.utils.debug("If the error message above contains a warning about wrong/missing Qt version please install the required version. You can get the installer from 'https://download.qt.io/archive/qt/'. Sadly you will need to create a free account to install. After installation please configure the shell script '/usr/bin/ODAFileConverter' to add a preceding line with content similar to 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Qt5.14.2/5.14.2/gcc_64/lib/'.")
exit(1) exit(1)
# check if ODA converted successfully. This is the case if no error file was created
oda_errorfile = os.path.join(temp_output_dir, Path(inputfile).name + ".err")
if os.path.exists(oda_errorfile):
inkex.utils.debug("ODA File Converter failed to process the file. Cannot continue DXF/DWG import. The error message is:")
errormessage = open(oda_errorfile, 'r')
errorlines = errormessage.readlines()
for errorline in errorlines:
inkex.utils.debug(errorline.strip())
errormessage.close()
exit(1)
# Do some movings/copies of skipped or processed DXF # Do some movings/copies of skipped or processed DXF
if self.options.oda_skip_dxf_to_dxf: #if true we need to move the file to simulate "processed" if self.options.oda_skip_dxf_to_dxf: #if true we need to move the file to simulate "processed"