Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: SimonBrown on April 13, 2017, 08:01:55 PM
-
Having recently upgraded to 1.3.1.4 I now find the following script:-
http://wiki.agisoft.com/w/index.php?title=Split_in_chunks.py&oldid=207 (http://wiki.agisoft.com/w/index.php?title=Split_in_chunks.py&oldid=207)
This script is really, really useful. Its a godsend for larger models such as this one:-
https://sketchfab.com/models/99d9f126ea0647f79e761d3cd2c1fca0 (https://sketchfab.com/models/99d9f126ea0647f79e761d3cd2c1fca0)
Created over 6 or 7 dives and now has nearly 10k images.
However, running the script triggers the following errors in the console:-
2017-04-13 17:47:31 class SplitDlg(QtWidgets.QDialog):
2017-04-13 17:47:31 NameError: name 'QtWidgets' is not defined
Can anyone suggest a fix for this one? its making me tear my hair out!
-
Hello SimonBrown,
That's very strange. Are you sure you've copied the full script including the following line:
from PySide2 import QtGui, QtCore, QtWidgets
-
Hi Alexey - yes the entire script including the line you mention.
The error occurs very soon on loading, triggered on the very line you refer to I believe.
-
Hello SimonBrown,
And could you input the following lines to the Console pane just for testing and provide the output:
from PySide2 import QtWidgets
QtWidgets.QDialog
-
Hi Alexey - here's the output:-
Out[1]: 2017-04-23 10:00:35 PySide2.QtWidgets.QDial
-
So it is supposed to be working. Can you then attache the script that you are usign to the post here?
-
Hi Alexey
Script file is attached/uploaded.
-
Hello Simon,
In the provided script there's line
from PyQt4 import QtGui, QtCore
instead of
from PySide2 import QtGui, QtCore, QtWidgets