Themapworkshop / COVID19TRACKER

QGIS Plugin to track the spread of COVID19
0 stars 1 forks source link

AttributeError: 'NoneType' object has no attribute 'renderer' #2

Open enzococca opened 4 years ago

enzococca commented 4 years ago

hi I have this error when try to push button 'case' or others

Themapworkshop commented 4 years ago

Hi which line in the code is the error?

enzococca commented 4 years ago

Covid19_Tracker.py, line 192, in openworld ren = a.renderer()

Il giorno lun 16 mar 2020 alle ore 18:06 Themapworkshop < notifications@github.com> ha scritto:

Hi which line in the code is the error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Themapworkshop/COVID19TRACKER/issues/2#issuecomment-599653938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2P5KB5YX3EESCSXN3NR3DRHZMBXANCNFSM4LMOA4UA .

-- Enzo Cocca PhD in "Science and Technology for Archaeology and Cultural Heritage"

ISMEO International Association of Mediterranean and Oriental Studies

mail: enzo.ccc@gmail.com cell: +393495087014

enzococca commented 4 years ago

I think also the type .symbol is not recognized. line 193

Il giorno lun 16 mar 2020 alle ore 18:07 Enzo Cocca enzo.ccc@gmail.com ha scritto:

Covid19_Tracker.py, line 192, in openworld ren = a.renderer()

Il giorno lun 16 mar 2020 alle ore 18:06 Themapworkshop < notifications@github.com> ha scritto:

Hi which line in the code is the error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Themapworkshop/COVID19TRACKER/issues/2#issuecomment-599653938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2P5KB5YX3EESCSXN3NR3DRHZMBXANCNFSM4LMOA4UA .

-- Enzo Cocca PhD in "Science and Technology for Archaeology and Cultural Heritage"

ISMEO International Association of Mediterranean and Oriental Studies

mail: enzo.ccc@gmail.com cell: +393495087014

-- Enzo Cocca PhD in "Science and Technology for Archaeology and Cultural Heritage"

ISMEO International Association of Mediterranean and Oriental Studies

mail: enzo.ccc@gmail.com cell: +393495087014

Themapworkshop commented 4 years ago

Which QGIS version/platform are you using? Because this plugin was developed on QGIS3.10 on Mac

enzococca commented 4 years ago

win10 /qgis3.12

Il giorno lun 16 mar 2020 alle ore 18:11 Themapworkshop < notifications@github.com> ha scritto:

Which QGIS version/platform are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Themapworkshop/COVID19TRACKER/issues/2#issuecomment-599656864, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2P5KDQUESEM66O4DYBSSTRHZMSBANCNFSM4LMOA4UA .

-- Enzo Cocca PhD in "Science and Technology for Archaeology and Cultural Heritage"

ISMEO International Association of Mediterranean and Oriental Studies

mail: enzo.ccc@gmail.com cell: +393495087014

enzococca commented 4 years ago

also with qgis3.10 is the same. Do you think the problem is windows?

Il giorno lun 16 mar 2020 alle ore 18:11 Enzo Cocca enzo.ccc@gmail.com ha scritto:

win10 /qgis3.12

Il giorno lun 16 mar 2020 alle ore 18:11 Themapworkshop < notifications@github.com> ha scritto:

Which QGIS version/platform are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Themapworkshop/COVID19TRACKER/issues/2#issuecomment-599656864, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2P5KDQUESEM66O4DYBSSTRHZMSBANCNFSM4LMOA4UA .

-- Enzo Cocca PhD in "Science and Technology for Archaeology and Cultural Heritage"

ISMEO International Association of Mediterranean and Oriental Studies

mail: enzo.ccc@gmail.com cell: +393495087014

-- Enzo Cocca PhD in "Science and Technology for Archaeology and Cultural Heritage"

ISMEO International Association of Mediterranean and Oriental Studies

mail: enzo.ccc@gmail.com cell: +393495087014

Themapworkshop commented 4 years ago

I will test it on a Windows computer and see if it works or not. I must admit that I don't understand why the .renderer() or .symbol() function is not working, because it works perfectly fine on my computer.. I will take a deeper look at it

Kind regards Pawel

Den man. 16. mar. 2020 kl. 17.58 skrev enzo notifications@github.com:

hi I have this error when try to push button 'case' or others

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Themapworkshop/COVID19TRACKER/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGWVOIQYOGOVGFKPCFG7LTRHZLCHANCNFSM4LMOA4UA .

enzococca commented 4 years ago

I commented from line 192 to 199 anc changed the folder name in the code from covid19trakers to COVID19TRACKER-master

and works! the problem is the last update I have is 03/03/2020

Il giorno lun 16 mar 2020 alle ore 18:28 Themapworkshop < notifications@github.com> ha scritto:

I will test it on a Windows computer and see if it works or not. I must admit that I don't understand why the .renderer() or .symbol() function is not working, because it works perfectly fine on my computer.. I will take a deeper look at it

Kind regards Pawel

Den man. 16. mar. 2020 kl. 17.58 skrev enzo notifications@github.com:

hi I have this error when try to push button 'case' or others

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Themapworkshop/COVID19TRACKER/issues/2, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOGWVOIQYOGOVGFKPCFG7LTRHZLCHANCNFSM4LMOA4UA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Themapworkshop/COVID19TRACKER/issues/2#issuecomment-599665530, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2P5KHH2ZHOIH64MCDOHLLRHZOSNANCNFSM4LMOA4UA .

-- Enzo Cocca PhD in "Science and Technology for Archaeology and Cultural Heritage"

ISMEO International Association of Mediterranean and Oriental Studies

mail: enzo.ccc@gmail.com cell: +393495087014

gubuntu commented 4 years ago

I have the same problem on Mac, QGIS 3.10

An error has occurred while executing Python code: 

AttributeError: 'NoneType' object has no attribute 'renderer' 
Traceback (most recent call last):
  File "/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/COVID19TRACKER/Covid19_Tracker.py", line 204, in cases
    self.openworld()
  File "/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/COVID19TRACKER/Covid19_Tracker.py", line 192, in openworld
    ren = a.renderer()
AttributeError: 'NoneType' object has no attribute 'renderer'

Python version: 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)] 
QGIS version: 3.10.3-A Coruña A Coruña, 0e1f846438 

Python Path:
/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python
/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/plugins
/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/lib-dynload
/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python37.zip
/Applications/QGIS3.10.app/Contents/Resources/python
/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages
/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages/geos
/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7
/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python
.
/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/mmqgis/forms
Themapworkshop commented 4 years ago

Hi I had now also tested it on a windows computer, and when I out commented ren = a.renderer() and sym0, it started to work on my Windows. The last update for me is 3/16/20, so I wonder what why your is 3/3/20...

Kind Regards Pawel

Den tir. 17. mar. 2020 kl. 06.20 skrev Gavin Fleming < notifications@github.com>:

I have the same problem on Mac, QGIS 3.10

An error has occurred while executing Python code:

AttributeError: 'NoneType' object has no attribute 'renderer'

Traceback (most recent call last):

File "/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/COVID19TRACKER/Covid19_Tracker.py", line 204, in cases

self.openworld()

File "/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/COVID19TRACKER/Covid19_Tracker.py", line 192, in openworld

ren = a.renderer()

AttributeError: 'NoneType' object has no attribute 'renderer'

Python version: 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]

QGIS version: 3.10.3-A Coruña A Coruña, 0e1f846438

Python Path:

/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python

/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python

/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins

/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/plugins

/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/lib-dynload

/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python37.zip

/Applications/QGIS3.10.app/Contents/Resources/python

/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages

/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages/geos

/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7

/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python

.

/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/mmqgis/forms

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Themapworkshop/COVID19TRACKER/issues/2#issuecomment-599883209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGWVOKQXI7TV3TMK6E4CZDRH4CBFANCNFSM4LMOA4UA .

Themapworkshop commented 4 years ago

Hi I had now deleted and uploaded the improved version of the plugin. Now it should be working.

Kind regards Pawel

Den tir. 17. mar. 2020 kl. 09.35 skrev TheMap Workshop < themapworkshop@gmail.com>:

Hi I had now also tested it on a windows computer, and when I out commented ren = a.renderer() and sym0, it started to work on my Windows. The last update for me is 3/16/20, so I wonder what why your is 3/3/20...

Kind Regards Pawel

Den tir. 17. mar. 2020 kl. 06.20 skrev Gavin Fleming < notifications@github.com>:

I have the same problem on Mac, QGIS 3.10

An error has occurred while executing Python code:

AttributeError: 'NoneType' object has no attribute 'renderer'

Traceback (most recent call last):

File "/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/COVID19TRACKER/Covid19_Tracker.py", line 204, in cases

self.openworld()

File "/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/COVID19TRACKER/Covid19_Tracker.py", line 192, in openworld

ren = a.renderer()

AttributeError: 'NoneType' object has no attribute 'renderer'

Python version: 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]

QGIS version: 3.10.3-A Coruña A Coruña, 0e1f846438

Python Path:

/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python

/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python

/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins

/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/plugins

/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/lib-dynload

/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python37.zip

/Applications/QGIS3.10.app/Contents/Resources/python

/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages

/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages/geos

/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7

/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python

.

/Users/gavinfleming/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/mmqgis/forms

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Themapworkshop/COVID19TRACKER/issues/2#issuecomment-599883209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGWVOKQXI7TV3TMK6E4CZDRH4CBFANCNFSM4LMOA4UA .

benhur07b commented 4 years ago

Hi! If you're installing this from ZIP (e.g. name would be COVID19TRACKER-master), make sure you rename the folder where the plugin is installed to covid19_tracker. It seems the code is looking specifically for that path to load the layers: See lines 189, 210, 281, 349, and 367 of Covid19_Tracker.py.

You can also replace covid19_tracker in the following lines to the name of the folder where the plugin is installed.

Themapworkshop commented 4 years ago

Yes, the code is made to find the path to the plugin folder and import some files from there, as well as to create new ones. By default, the name covid19_tracker works unless the user changes it.

I had re-uploaded the plugin, and everything should work now. Please let me know if there is anything needed in order to get the approval on qgis.org

Kind regards Pawel

Den tir. 17. mar. 2020 kl. 16.50 skrev Ben Hur notifications@github.com:

Hi! If you're installing this from ZIP (e.g. name would be COVID19TRACKER-master), make sure you rename the folder where the plugin is installed to covid19_tracker. It seems the code is looking specifically for that path to load the layers: See lines 189, 210, 281, 349, and 367 of Covid19_Tracker.py.

You can also replace covid19_tracker in the following lines to the name of the folder where the plugin is installed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Themapworkshop/COVID19TRACKER/issues/2#issuecomment-600146168, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGWVOMFSZXIDPLUUOTGUFTRH6L5FANCNFSM4LMOA4UA .

benhur07b commented 4 years ago

Inspired by your work, I also created a python script for loading the data from the JHU CSSE repo. This version does away with the need for pandas in loading the data and, as much as possible, uses the Python standard library + built-in PyQGIS functions. You may check it out here: https://github.com/benhur07b/covid19-load-qgis

I was thinking of making it a plugin too but right now I'm satisfied with using it as a script. Feel free to use the code if you think it can add to your plugin.

All the best, Ben Hur

Gustry commented 4 years ago

Hi I had now deleted and uploaded the improved version of the plugin.

You should release a new version of the plugin, not updating a existing one. You metadata.txt is still mentioning 0.1 : https://github.com/Themapworkshop/COVID19TRACKER/blob/master/metadata.txt#L9