- if PikePDF module is not available then show an error but run the app (currently, for Python 3.11 is the only module not available)
This commit is contained in:
@@ -7,6 +7,10 @@ CHANGELOG for FlatCAM Evo beta
|
|||||||
|
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
|
6.11.2022
|
||||||
|
|
||||||
|
- if PikePDF module is not available then show an error but run the app (currently, for Python 3.11 is the only module not available)
|
||||||
|
|
||||||
19.10.2022
|
19.10.2022
|
||||||
|
|
||||||
- added a hack so the Gerber files from Allegro 17.2 (which do not follow the Gerber specifications) can be loaded
|
- added a hack so the Gerber files from Allegro 17.2 (which do not follow the Gerber specifications) can be loaded
|
||||||
|
|||||||
@@ -7,9 +7,15 @@
|
|||||||
|
|
||||||
from appTool import *
|
from appTool import *
|
||||||
from appParsers.ParsePDF import PdfParser
|
from appParsers.ParsePDF import PdfParser
|
||||||
from pikepdf import Pdf, parse_content_stream
|
|
||||||
from camlib import grace
|
from camlib import grace
|
||||||
|
|
||||||
|
HAS_PIKE_MODULE = True
|
||||||
|
try:
|
||||||
|
from pikepdf import Pdf, parse_content_stream
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
HAS_PIKE_MODULE = False
|
||||||
|
|
||||||
fcTranslate.apply_language('strings')
|
fcTranslate.apply_language('strings')
|
||||||
if '_' not in builtins.__dict__:
|
if '_' not in builtins.__dict__:
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
@@ -96,6 +102,11 @@ class ToolPDF(AppTool):
|
|||||||
self.app.inform.emit('[ERROR_NOTCL] %s' % _("File no longer available."))
|
self.app.inform.emit('[ERROR_NOTCL] %s' % _("File no longer available."))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if HAS_PIKE_MODULE is False:
|
||||||
|
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Failed."))
|
||||||
|
self.app.log.error("PikePDF module is not available.")
|
||||||
|
return
|
||||||
|
|
||||||
short_name = filename.split('/')[-1].split('\\')[-1]
|
short_name = filename.split('/')[-1].split('\\')[-1]
|
||||||
self.parsing_promises.append(short_name)
|
self.parsing_promises.append(short_name)
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ pyopengl
|
|||||||
pyqt6>=6.1.0
|
pyqt6>=6.1.0
|
||||||
freetype-py
|
freetype-py
|
||||||
vispy>=0.9.0
|
vispy>=0.9.0
|
||||||
pyqtdarktheme
|
pyqtdarktheme=1.1.1
|
||||||
|
|
||||||
gdal
|
gdal
|
||||||
rasterio
|
rasterio
|
||||||
|
|||||||
Reference in New Issue
Block a user