Using recent Safecast plugin for QGIS on macOS--Help!

30 views
Skip to first unread message

David Wood

unread,
Nov 16, 2022, 12:06:46 AM11/16/22
to Safecast Discussion Group
Dear bGeigie Nano + QGIS users,

The good old Safecast plugin [qgis-safecast-plugin] for QGIS versions 2.x was very useful to me in processing bGeigie Nano log files several years ago. I have recently downloaded the current version of the plugin from https://github.com/OpenGeoLabs/qgis-safecast-plugin where it is referred to as the QGIS Radiation Toolbox, and am trying to load the plugin to a macOS version of QGIS-LTR (3.22.12)

I have read https://opengeolabs.github.io/qgis-safecast-plugin/installation.html but it appears to be relevant only once the plugin has been correctly installed, and mostly for Windows.

Upon importing the plugin as a .zip file (made WITHOUT the macOS GUI-based compress utility, instead with the command-line version of zip), QGIS reports

ModuleNotFoundError: No module named 'qgis.PyQt.QtCore.QtGui'; 'qgis.PyQt.QtCore' is not a package

Traceback (most recent call last):
File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/Volumes/BigFast/Users/dmwood/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgis-safecast-plugin/__init__.py", line 33, in classFactory
from .safecast_plugin import Safecast
File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Volumes/BigFast/Users/dmwood/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgis-safecast-plugin/safecast_plugin.py", line 29, in
from qgis.PyQt.QtCore.QtGui import QAction, QIcon, QToolButton
File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'qgis.PyQt.QtCore.QtGui'; 'qgis.PyQt.QtCore' is not a package

Python version: 3.8.7 (default, Feb 10 2021, 09:04:08) [Clang 12.0.0 (clang-1200.0.32.29)]
QGIS version: 3.22.12-Białowieża Białowieża, b8534cb115
Python Path:
• /Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python
• /Volumes/BigFast/Users/dmwood/Library/Application Support/QGIS/QGIS3/profiles/default/python
• /Volumes/BigFast/Users/dmwood/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
• /Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/Pillow-7.2.0-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/geopandas-0.8.1-py3.8.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/snuggs-1.4.7-py3.8.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/rasterio-1.1.5-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/numpy-1.20.1-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/cftime-1.2.1-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/numba-0.50.1-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/pyproj-2.6.0-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python38.zip
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/Fiona-1.8.13.post1-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/Rtree-0.9.4-py3.8.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/netCDF4-1.5.4-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/click_plugins-1.1.1-py3.8.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/GDAL-3.2.1-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/scipy-1.5.1-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/lib-dynload
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/patsy-0.5.1-py3.8.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/opencv_contrib_python-4.3.0.36-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/affine-2.3.0-py3.8.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/pandas-1.1.0-py3.8-macosx-10.13.0-x86_64.egg
• /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/statsmodels-0.11.1-py3.8-macosx-10.13.0-x86_64.egg
• /Volumes/BigFast/Users/dmwood/Library/Application Support/QGIS/QGIS3/profiles/default/python

The paths above looks benign to me. However, if I then examine Installed plugins, I see that the Safecast Plugin is INSTALLED and shown in bold red, with the warning: This plugin is incompatible with this version of QGIS
Plugin designed for QGIS 2.14 - 2.99

If I use the QGIS python console and type in import sys, print (sys.version) gives:

3.8.7 (default, Feb 10 2021, 09:04:08)
[Clang 12.0.0 (clang-1200.0.32.29)]

This looks consistent with what what I saw above.

The About QGIS panel gives:

QGIS version 3.22.12-Białowieża QGIS code revision b8534cb115
Qt version 5.14.2
Python version 3.8.7
GDAL/OGR version 3.2.1
PROJ version 6.3.2
EPSG Registry database version v9.8.6 (2020-01-22)
GEOS version 3.9.1-CAPI-1.14.2
SQLite version 3.31.1
PostgreSQL client version 12.3
SpatiaLite version 4.3.0a
QWT version 6.1.4
QScintilla2 version 2.11.4
OS version macOS 13.0Active Python plugins
processing 2.12.99
sagaprovider 2.12.99
grassprovider 2.12.99
db_manager 0.1.20
MetaSearch 0.3.5

Are there other Mac QGIS users who also use the Safecast plugin? Any suggestions?

Interestingly, I get "ModuleNotFoundError: No module named 'qgis.PyQt.QtCore.QtGui'; 'qgis.PyQt.QtCore' is not a package “ even under Windows 11.

Thanks!

David Wood
wood...@gmail.com



David Wood

unread,
Nov 16, 2022, 12:27:38 AM11/16/22
to Safecast Discussion Group
Dear all,

Please ignore my previous post—I struggled so long that I must have mis-loaded the wrong plugin source. All is well using the Radiation Toolbox plugin, and thanks to those who wrote it.

David Wood
wood...@gmail.com



Anthony Anecito

unread,
Nov 16, 2022, 10:14:24 AM11/16/22
to safecas...@googlegroups.com
Thanks David glad to hear this! I will have to find the source to see
how they got past the 25 row limit I am seeing!
Tony Anecito
> --
> --
> ** This is a public discussion mailing list, opinions expressed on this list belong to the individual only, and are not to be taken as official statements from Safecast.
> http://groups.google.com/group/safecast-japan
>
>
> http://safecast.org
>
> ---
> You received this message because you are subscribed to the Google Groups "Safecast Discussion Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to safecast-japa...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/safecast-japan/A3895550-35C1-411A-AF7E-1C3624747C7E%40gmail.com.

jan.he...@gmail.com

unread,
Nov 20, 2022, 1:11:38 PM11/20/22
to Safecast Discussion Group
Dear Tony,
the Radiation Toolbox plugin has different use - it was developed to display and possibly also edit (crop, split, delete some parts) of the single LOG files from bGeigie Nano device - before you upload it to the API or for offline data viewing in the field etc.
In your case it is important if you want to add the stationary stations to your app or also the data from mobile measurements - in case you wanted to add the interpolated layer like the Safecast Map uses, you might study more the documentation and code of the tilemap - I am not programmer and have no idea if it is possible to load the Safecast map tiles in 3rd party app... Someone from the Safecast crew might know more.

regards

Jan

Dne středa 16. listopadu 2022 v 16:14:24 UTC+1 uživatel tony.a...@gmail.com napsal:

Anthony Anecito

unread,
Nov 27, 2022, 4:38:20 PM11/27/22
to Safecast Discussion Group
Thanks Jan. I was able to get past 25 records and now up to 1k records per rest call which I believe is the limit for a rest call. I was able to display those and now up to nearly a month of data or nearly 900k records. I had some other priorities and may look at it later.

Regards,
-Tony
Reply all
Reply to author
Forward
0 new messages