Bug report #18316

type object 'QgsMessageBar' has no attribute 'SUCCESS'

Added by Fernando Garay about 2 years ago. Updated about 2 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Actions
Affected QGIS version:3.0.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:Yes Copied to github as #:26206

Description

Traceback (most recent call last):
File "C:/Users/fernando.garay/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\autoSaver\autosave.py", line 366, in cronEvent
self.saveCurrentProject()
File "C:/Users/fernando.garay/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\autoSaver\autosave.py", line 396, in saveCurrentProject
self.iface.messageBar().pushMessage("Autosave", u"project autosaved to: "+bakFileName, level=qgis.gui.QgsMessageBar.SUCCESS, duration=10 )
AttributeError: type object 'QgsMessageBar' has no attribute 'SUCCESS'

History

#1 Updated by Nyall Dawson about 2 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

This bug needs to be filed with the autosave plugin, not qgis.

#2 Updated by Jakub Kosik about 2 years ago

It is related to qgis - today I found same with QgsMessageLog - something wrong with enums. If I use QgsMessageLog.INFO I got errors, replaced by integer "0" works.

#3 Updated by Nyall Dawson about 2 years ago

That's because the api changed with version 3. QgsMessageLog.INFO no longer exists.

Also available in: Atom PDF