I'd suggest taking advantage of this update and changing the line which reads the file in pywps/configuration.py to the following:
loaded_files = CONFIG.read(config_files, encoding='utf-8')
Right now pywps may or may not crash when reading the config-file depending on whether or not you're:
-using any non-ascii characters in the config file.
-what the default character set is for your specific machine.
I think it would've been better to always expect a utf-8 config-file, rather than letting it depend on the specific machine.
This might not be viable if pywps still wants to support python 2.7 or python < 3.2
Environment
operating system: Centos 7
Python version: 3.6
PyWPS version: 4.2.4
source/distribution
[X ] PyPI
web server
[X ] Apache/mod_wsgi
Steps to Reproduce
Create and load a config-file encoded as utf-8 containing one or more non-ascii characters. OBS: must be done on a machine where the non-ascii character is not a part of the character set used by open() .
In python 3.2 configparser added support for the encoding-parameter: https://docs.python.org/3.5/library/configparser.html#configparser.ConfigParser.read Before this configparser just opened the file in whatever open() expected, which again used whatever the local default encoding/character set was.
I'd suggest taking advantage of this update and changing the line which reads the file in pywps/configuration.py to the following:
loaded_files = CONFIG.read(config_files, encoding='utf-8')
Right now pywps may or may not crash when reading the config-file depending on whether or not you're: -using any non-ascii characters in the config file. -what the default character set is for your specific machine.
I think it would've been better to always expect a utf-8 config-file, rather than letting it depend on the specific machine.
This might not be viable if pywps still wants to support python 2.7 or python < 3.2
Environment
Steps to Reproduce
Create and load a config-file encoded as utf-8 containing one or more non-ascii characters. OBS: must be done on a machine where the non-ascii character is not a part of the character set used by open() .
Additional Information