Riverscapes / riverscapes-tools

Open-source Python 3.0 tools for the Riverscapes organization
https://tools.riverscapes.net/
GNU General Public License v3.0
11 stars 8 forks source link

Python error encountered when opening VBET project from new warehouse #773

Open shelbysawyer opened 1 year ago

shelbysawyer commented 1 year ago

I tried to open this project in QRV to test the V2 business logic, and got this error:

An error has occurred while executing Python code: 

AttributeError: 'NoneType' object has no attribute 'text' 
Traceback (most recent call last):
  File "C:/Users/shelby/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qrave_toolbar\src\qrave_toolbar.py", line 355, in projectBrowserDlg
    self.dockwidget.add_project(dialog_return[0])
  File "C:/Users/shelby/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qrave_toolbar\src\dock_widget.py", line 207, in add_project
    basename = test_project.qproject.text()
AttributeError: 'NoneType' object has no attribute 'text'

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] 
QGIS version: 3.18.2-Zürich Zürich, 515138c171 

Python Path:
C:/PROGRA~1/QGIS3~1.18/apps/qgis/./python
C:/Users/shelby/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/shelby/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS3~1.18/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS3~1.18\apps\Python37
C:\PROGRA~1\QGIS3~1.18\apps\Python37\Scripts
C:\Program Files\QGIS 3.18\bin\python37.zip
C:\PROGRA~1\QGIS3~1.18\apps\Python37\DLLs
C:\PROGRA~1\QGIS3~1.18\apps\Python37\lib
C:\Program Files\QGIS 3.18\bin
C:\PROGRA~1\QGIS3~1.18\apps\Python37\lib\site-packages
C:\PROGRA~1\QGIS3~1.18\apps\Python37\lib\site-packages\win32
C:\PROGRA~1\QGIS3~1.18\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS3~1.18\apps\Python37\lib\site-packages\Pythonwin
C:/Users/shelby/AppData/Roaming/QGIS/QGIS3\profiles\default/python

@MattReimer @philipbaileynar @jtgilbert just putting this on your radar. Could it just be a problem on my end?

philipbaileynar commented 1 year ago

Actually going to assign this to @KellyMWhitehead. He's currently leading desktop QGIS plugin development

MattReimer commented 1 year ago

I think this is related to:

shelbysawyer commented 1 year ago

Just had a quick chat with @KellyMWhitehead

I thought hitting "update resources" in the QRV toolbar updates the XML in that app data / roaming folder that "Find Resources Folder" brings you to.. but I noticed that it doesn't seem to be updating to match what's on Git. I think that might be part of the problem I'm having

philipbaileynar commented 1 year ago

I presume the update resources will only update based on the master branch. In other words, pull requests need to be fully merged.

Are you sure the changes you want are on the master branch?

shelbysawyer commented 1 year ago

Yes, the latest updates from this morning were merged to the master branch and I see those latest changes to the V1 BL reflected here. Kelly said he was seeing this problem too (where 'Update Resources' doesn't update the XML in the local resources folder).

philipbaileynar commented 1 year ago

There can be a slight lag at GitHub between the branch getting updated and the content being available at the specified URL.

The code to update the resources has not changed in a long time. If there are no bugs throwing in the code then I think it might just be GitHub delay in serving the latest version of the file in their content delivery system. (The lag is somewhat intentional as they don't really want people using their systems to serve high traffic content in this way.)

@MattReimer might I be on the right track?

MattReimer commented 1 year ago

You could be but my spidey sense is tingling a bit since this issue has cropped up multiple times that there is something in QRave that we are not try-catching. No matter what state the business logic is in you should not be seeing this error.

Certainly there is a delay when the pull request goes through but that shouldn't cause a QRave error

BTW: If you want an indication of when the branch is ready to use you can actually see it on the Repo's main page

Screenshot 2023-04-18 at 1 50 54 PM