dnaeon / py-vpoller

Distributed vSphere API Proxy
Other
83 stars 31 forks source link

TypeError: option values must be strings with Python 3.8 #273

Closed nikypint closed 4 years ago

nikypint commented 4 years ago

Hi, if install with python 3.8 vpoller-worker doesn't work anymore. I receive this error when running in debug mode:

[2020-05-22 14:41:33,793 - INFO/MainProcess] Starting Worker Manager [0.7.3 release] [2020-05-22 14:41:33,794 - DEBUG/MainProcess] Loading config file /etc/vpoller/vpoller.conf Traceback (most recent call last): File "/usr/local/bin/vpoller-worker", line 138, in main() File "/usr/local/bin/vpoller-worker", line 128, in main start( File "/usr/local/bin/vpoller-worker", line 62, in start manager.start() File "/usr/local/lib/python3.8/dist-packages/vpoller/worker.py", line 117, in start self.load_config() File "/usr/local/lib/python3.8/dist-packages/vpoller/worker.py", line 156, in load_config parser = ConfigParser(self.config_defaults) File "/usr/lib/python3.8/configparser.py", line 639, in init self._read_defaults(defaults) File "/usr/lib/python3.8/configparser.py", line 1219, in _read_defaults self.read_dict({self.default_section: defaults}) File "/usr/lib/python3.8/configparser.py", line 754, in read_dict self.set(section, key, value) File "/usr/lib/python3.8/configparser.py", line 1200, in set self._validate_value_types(option=option, value=value) File "/usr/lib/python3.8/configparser.py", line 1185, in _validate_value_types raise TypeError("option values must be strings") TypeError: option values must be strings

I see that the error is on line 156 of worker.py: seams that can't load "self.config_defaults". I rewrite comand without these string:

parser = ConfigParser()

and all is working fine.

Is needed the embedded self.config_defaults or is a redundant infos?

Thanks

dnaeon commented 4 years ago

Hi,

Can you please consider submitting a PR?

Thanks!

dnaeon commented 4 years ago

Should be fixed in https://github.com/dnaeon/py-vpoller/commit/f24774dabd757f2dcdb5f27902de526cc5ff30b9

Let me know if you still run into this problem.