- made a hack so if the Image Import plugin can't be loaded due of dependencies errors the app will not crash but this plugin will no longer be available
This commit is contained in:
@@ -17,7 +17,7 @@ CHANGELOG for FlatCAM beta
|
||||
- in Geometry object the default self.options dictionary is updated with keys that reflect new data structure
|
||||
- added comments in the `default` preprocessors which will help other people create their own preprocessors
|
||||
- remade the Image Import plugin in an attempt to fix issues with the latest packages of Gdal and Rasterio but it looks that it is a conflict between the Rasterio 1.2.10, Gdal 3.4.1 and Shapely 1.8.0
|
||||
|
||||
- made a hack so if the Image Import plugin can't be loaded due of dependencies errors the app will not crash but this plugin will no longer be available
|
||||
|
||||
18.01.2022
|
||||
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
# Date: 3/10/2019 #
|
||||
# MIT Licence #
|
||||
# ##########################################################
|
||||
import sys
|
||||
|
||||
from PyQt6 import QtGui, QtWidgets
|
||||
import os
|
||||
import os, sys
|
||||
|
||||
from shapely.geometry import shape
|
||||
from shapely.ops import unary_union
|
||||
@@ -15,7 +13,7 @@ from shapely.affinity import scale, translate
|
||||
|
||||
import numpy as np
|
||||
|
||||
# import rasterio
|
||||
import rasterio
|
||||
from rasterio import open as rasterio_open
|
||||
from rasterio.features import shapes
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@ from appPlugins.ToolAlignObjects import AlignObjects
|
||||
|
||||
from appPlugins.ToolFilm import Film
|
||||
|
||||
from appPlugins.ToolImage import ToolImage
|
||||
try:
|
||||
from appPlugins.ToolImage import ToolImage
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from appPlugins.ToolDistance import Distance
|
||||
from appPlugins.ToolObjectDistance import ObjectDistance
|
||||
|
||||
11
app_Main.py
11
app_Main.py
@@ -1998,10 +1998,13 @@ class App(QtCore.QObject):
|
||||
pos=self.ui.menufileimport,
|
||||
separator=True)
|
||||
|
||||
self.image_tool = ToolImage(self)
|
||||
self.image_tool.install(icon=QtGui.QIcon(self.resource_location + '/image32.png'),
|
||||
pos=self.ui.menufileimport,
|
||||
separator=True)
|
||||
try:
|
||||
self.image_tool = ToolImage(self)
|
||||
self.image_tool.install(icon=QtGui.QIcon(self.resource_location + '/image32.png'),
|
||||
pos=self.ui.menufileimport,
|
||||
separator=True)
|
||||
except Exception:
|
||||
self.image_tool = lambda x: None
|
||||
|
||||
self.pcb_wizard_tool = PcbWizard(self)
|
||||
self.pcb_wizard_tool.install(icon=QtGui.QIcon(self.resource_location + '/drill32.png'),
|
||||
|
||||
Reference in New Issue
Block a user