pac4cli icon indicating copy to clipboard operation
pac4cli copied to clipboard

pac4cli getting errors on 22.04 even with DynamicUser=true

Open rbeldin opened this issue 1 year ago • 2 comments

Hi...

I thought I had the same issue in Ubuntu 22.04 as seen in the issue:

Pac4cli recently broke on Ubuntu 20.04 https://github.com/tkluck/pac4cli/issues/78

But I have made the change to DynamicUseer=True and am seeing stack traces on startup:

Dec 08 15:05:25 rbeldin-HP-ZBook-15-G3 systemd[1]: Started PAC autoconfigured proxy for use through http_proxy= environment variables. Dec 08 15:05:25 rbeldin-HP-ZBook-15-G3 /usr/lib/python3/dist-packages/pac4cli/main.py[14353]: WARNING [14353]: pac4cli: Problem reading configuration file /etc/pac4cli/pac4cli.config Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pac4cli/wpad.py", line 136, in getUrls wpad_url = self.get_config_wpad_url(self.config_file) File "/usr/lib/python3/dist-packages/pac4cli/wpad.py", line 125, in get_config_wpad_url url = config.get('wpad', 'url') File "/usr/lib/python3.10/configparser.py", line 783, in get d = self._unify_values(section, vars) File "/usr/lib/python3.10/configparser.py", line 1154, in _unify_values raise NoSectionError(section) from None configparser.NoSectionError: No section: 'wpad'

My config file is a single line:

url=http://autocache.acme.corp/

It seems to 'mostly' work with the errors above, but it seems it is complaining about the format.

Do I have the format incorrect?

Thanks

rbeldin avatar Dec 08 '23 23:12 rbeldin

It seems that your config file is missing the section wpad. It should look like so:

[wpad]
url=http://autocache.acme.corp/

kdehairy avatar Dec 09 '23 09:12 kdehairy

Indeed, I was missing that.

rbeldin avatar Dec 12 '23 21:12 rbeldin