BASEMENTBasic Simulation Environment for computation of environmental flow and natural hazard simulationLaboratory of Hydraulics, Hydrology and Glaciology (VAW)ETH Zurich | ![]() |
You are not logged in.
Hi everyone,
I recently installed QGIS 2.18.19 on my MacBook Pro (13-inch, Mid 2012, 2x 2.5 GHz Intel Core i5 Processors, 8 GB 1600 MHz DDR3 RAM, 1TB SSD hard drive) with OS MacOS High Sierra v. 10.13.4 (17E202).
When I try to create a quality mesh of a random polygon with default parameters I get this error:
NameError: global name 'QString' is not defined
Traceback (most recent call last):
File "/path/to/.qgis2/python/plugins/BASEmesh/quality/quality_dialog.py", line 119, in readTriangleErrors
self.textStatusBox.append("Triangle error:" + QString(self.process.readAllStandardError()))
NameError: global name 'QString' is not defined
Which, to me, means two separate things:
1. there is a problem with PyQt4 which has no QString under QtCore (under MacOS QGIS has Python 2.7.10 which apparently has no QString, same as Python 2.7.12; on the contrary python 2.7.15 has QString).
On this I run a test: I opened the python console in QGIS and typed
from PyQt4.QtCore import *
str = QString('testing')
and I got an error, i.e.: NameError: name 'QString' is not defined
This might be a bug, i.e. a code review might be needed to substitute QString with some other method. However, this does not prevent BASEmesh from functioning since I run the test under ubuntu in a virtual machine and it failed, too, but contrarily to what is happening on my mac, under ubuntu BASEmesh is working.
2. Triangle is not working under MacOS. To this I have found no solution at this time since I have compiled triangle on my mac and even compiled it in python (import triangle works in python).
Is any of you experiencing anything similar? Have you found a solution? The only workaround I have found is to produce my meshes on a virtual machine with ubuntu.
Bests,
Matteo
Offline
short notice in advance: BASEmesh was never developed/tested under Mac OSX. Although, the changes needed to be totally platform Independent should be minor. Nevertheless some thoughts on your issues:
1. The Qstring issue is not related with your Python Version directly. Even with 'old' Python Version 2.7.3 and the appropriate PyQt4 library QString is available. Probably there are multiple Python istallations on your OSX machine...or deprecated/conflicting PyQt4 versions therefore?
2. The 'triangle' executable is not compiled for Darwin Systems in BASEmesh, therefore it is no surprise that it does not run As mentioned above, this could be easily done and included in future BASEmesh Releases.
Offline