This code fixes the issue, but I can't make it work with:
QtWidgets.QMessageBox.No/Yes.
At this point I'm getting rather frustrated with this issue and would gladly give it up for someone who's a better programmer.
\openlp\core\common\applocation.py
@staticmethod
def get_data_path():
"""
Return the path OpenLP stores all its data under.
"""
from openlp.core.lib.ui import critical_error_message_box
from openlp.core.common import AppLocation, Settings, translate
# Check if we have a different data location.
if Settings().contains('advanced/data path'):
path = Settings().value('advanced/data path')
if not os.path.exists(path): critical_error_message_box(translate('OpenLP.Manager', 'Database Error'), translate('OpenLP.Manager', 'OpenLP cannot load your database.\n\nDatabase:')) Settings().remove('advanced/data path') path = AppLocation.get_directory(AppLocation.DataDir) check_directory_exists(path)
else:
path = AppLocation.get_directory(AppLocation.DataDir) check_directory_exists(path)
return os.path.normpath(path)
https:/ /gist.github. com/anonymous/ 10c11792c0b37ec 3693bf9494017a3 aa
This code fixes the issue, but I can't make it work with: QMessageBox. No/Yes.
QtWidgets.
At this point I'm getting rather frustrated with this issue and would gladly give it up for someone who's a better programmer.
\openlp\ core\common\ applocation. py
@staticmethod error_message_ box ).contains( 'advanced/ data path'): ).value( 'advanced/ data path') exists( path):
critical_ error_message_ box(translate( 'OpenLP. Manager' , 'Database Error'),
translate( 'OpenLP. Manager' ,
'OpenLP cannot load your database. \n\nDatabase: '))
Settings( ).remove( 'advanced/ data path')
path = AppLocation. get_directory( AppLocation. DataDir)
check_ directory_ exists( path) get_directory( AppLocation. DataDir)
check_ directory_ exists( path) normpath( path)
def get_data_path():
"""
Return the path OpenLP stores all its data under.
"""
from openlp.core.lib.ui import critical_
from openlp.core.common import AppLocation, Settings, translate
# Check if we have a different data location.
if Settings(
path = Settings(
if not os.path.
else:
path = AppLocation.
return os.path.