2

I am trying to create a Midvatten database and i keep getting error message that says "error has occured while executing python code (python error)". Below is the error message: 2016-08-09T18:28:49 1 Traceback (most recent call last): File "C:/Users/agustus/.qgis2/python/plugins\midvatten\midvatten.py", line 654, in new_db newdbinstance = newdb(verno) File "C:\Users\agustus.qgis2\python\plugins\midvatten\tools\create_db.py", line 35, in init self.create_new_db(verno,user_select_CRS,EPSG_code)#CreateNewDB(verno) File "C:\Users\agustus.qgis2\python\plugins\midvatten\tools\create_db.py", line 78, in create_new_db self.rs = self.cur.execute(line.replace('CHANGETORELEVANTEPSGID',str(EPSGID)).replace('CHANGETOPLUGINVERSION',str(verno)).replace('CHANGETOQGISVERSION',str(qgisverno)).replace('CHANGETOSPLITEVERSION',str(versionstext[0][0]))) # use tags to find and replace SRID and versioning info UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position 8: ordinal not in range(128)

2016-08-09T18:45:19 1 Traceback (most recent call last): File "C:/Users/agustus/.qgis2/python/plugins\midvatten\midvatten.py", line 654, in new_db newdbinstance = newdb(verno) File "C:\Users\agustus.qgis2\python\plugins\midvatten\tools\create_db.py", line 35, in init self.create_new_db(verno,user_select_CRS,EPSG_code)#CreateNewDB(verno) File "C:\Users\agustus.qgis2\python\plugins\midvatten\tools\create_db.py", line 78, in create_new_db self.rs = self.cur.execute(line.replace('CHANGETORELEVANTEPSGID',str(EPSGID)).replace('CHANGETOPLUGINVERSION',str(verno)).replace('CHANGETOQGISVERSION',str(qgisverno)).replace('CHANGETOSPLITEVERSION',str(versionstext[0][0]))) # use tags to find and replace SRID and versioning info UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position 8: ordinal not in range(128)

i do have no idea how to fix this.

2

Are you using QGIS 2.16 'Nødebo'? If so, you may have encountered this bug.

The bug has been fixed and for Midvatten plugin users, now there are three alternatives:

  1. keep using qgis 2.14 until we release next version of midvatten plugin including this bug fix
  2. work with the development version of midvatten plugin from this this git repository (not really recommended since we are working on some major database design changes)
  3. minor fix of your own midvatten plugin installation: open the file "create_db.py" and replace "str(qgisverno)" with "qgisverno" on line 78

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.