Closed cryzed closed 8 years ago
Well, oops. I broken it. This is what I get for trying to fix things when I haven't gotten enough sleep. =\ I'll see what I can do about this.
Thank you!
I have an Ingress event tomorrow but I'll try and fix it up this weekend. It's broken for me (different error) and I'll work something out.
I am also receiving the same error as the original when running pia -a as root
Should be fixed now ... let me know.
@flamusdiu which commit should we test, f5c7ebcaaa747b277f5ad91cd97650b9a597020e (which is the latest pushed as of now)? It doesn't look like it contains a fix, and the issue is still reproducible... Maybe you forgot to push?
I'm still able to reproduce error on 2.6.1-1 here as well, fwiw.
haha ... wth ... let me see why it did it pushed. I swear I did!
Some how my changes got reverted ... let me fix it and I'll repush the version again
Lets try that again ... since I apparently messed up my merge ... =P Should be right now.
You will have to reinstall it though, I didn't change the version number .. just fixed my commits so it actually had the real comment that I missed.
I used commit 740438d7846b756b74ddbca2966f72b8ad6d14fe, the issue is still reproducible, the error is exactly the same as before in line 153, only now pia is 2.6.1:
$ sudo pia -a
Traceback (most recent call last):
File "/usr/bin/pia", line 9, in <module>
load_entry_point('pia==2.6.1', 'console_scripts', 'pia')()
File "/usr/lib/python3.5/site-packages/pia/command_line.py", line 23, in main
pia.run.run()
File "/usr/lib/python3.5/site-packages/pia/run.py", line 60, in run
[globals()[k]() for k, v in props.commandline.__dict__.items() if
File "/usr/lib/python3.5/site-packages/pia/run.py", line 61, in <listcomp>
not k == 'hosts' and getattr(props.commandline, k, None)]
File "/usr/lib/python3.5/site-packages/pia/run.py", line 110, in auto_configure
app.config(*getattr(openvpn, config))
File "/usr/lib/python3.5/site-packages/pia/applications/appstrategy.py", line 74, in config
self.app.config(config_id, filename)
File "/usr/lib/python3.5/site-packages/pia/applications/hooks.py", line 153, in config
"##port##": properties.props.port.split('/')[1],
IndexError: list index out of range
Does it not reproduce for you @flamusdiu ?
grr ... one sec
If it's of any help, mine errors on ln 65 instead:
`Traceback (most recent call last):
File "/usr/bin/pia", line 9, in
(sigh) let me see about these ... it seems to work in my virtual env but then it doesn't work when directly installed ... for the record I am getting this:
Traceback (most recent call last):
File "/usr/bin/pia", line 9, in <module>
load_entry_point('pia==2.6.1', 'console_scripts', 'pia')()
File "/usr/lib/python3.5/site-packages/pia/command_line.py", line 23, in main
pia.run.run()
File "/usr/lib/python3.5/site-packages/pia/run.py", line 60, in run
[globals()[k]() for k, v in props.commandline.__dict__.items() if
File "/usr/lib/python3.5/site-packages/pia/run.py", line 61, in <listcomp>
not k == 'hosts' and getattr(props.commandline, k, None)]
File "/usr/lib/python3.5/site-packages/pia/run.py", line 110, in auto_configure
app.config(*getattr(openvpn, config))
AttributeError: 'ApplicationStrategyOPENVPN' object has no attribute 'UKLondon'
@StickAndBindleGames Can you fix your comment? The formatting is all messed up. =\
Ha, apologies. It was hating every formatting I tried.
The root cause seems to be exactly the same, properties.props.port.split('/')
does not have two elements in the list. It can only be if the /
character is completely missing from that string (see below a few examples), but I don't know what kind of data properties.props.port
holds and where it gets filled in, and therefore why it does not have /
in it.
@flamusdiu does it ring any bell? Or is it possible that we are missing some configuration simply, that you have in your virtual environment?
$ python
Python 3.5.1 (default, Mar 3 2016, 09:29:07)
[GCC 5.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> "a/b".split('/')
['a', 'b']
>>> "ab/".split('/')
['ab', '']
>>> "/ab".split('/')
['', 'ab']
>>> "ab".split('/')
['ab']
Maybe. it's pulling that from the pia.conf
file if you have the port configured (ie `tcp\8080') I guess I need to insure it's not empty.
Sorry, I was working on pacman hooks already for this before I got to head of myself. lol. Let me see about getting this fixed. Thanks!
I confirm, creating the /etc/private-internet-access/pia.conf
(even as a complete copy of /etc/private-internet-access/pia-example.conf
) fixes this issue, so can be considered as a workaround until this bug is resolved.
Thanks @flamusdiu!
Ooo ... good find ... that's why I am not seeing it. Thanks!
@maximbaz can you try it again?
Just a note: I need to change pia -r
to attempt to remove all configurations. Seems it only removes all if you have no customized ones in pia.conf
or ONLY the ones in pia.conf
if configured. Not exactly how I want that to work. =\
It works now, pia -a
generated all configurations as expected even without pia.conf
file.
Thanks @flamusdiu!
Np. Just push another change due to update-resolv-conf missing. Let me know if you find anything else.
Thanks for the update-resolv-conf fix. I was about to mention I had to manually make that executable to get the previous fix to work, but was trying to figure out if It was a local error with my setup before commenting (had previously been toying with the file).
All is working smoothly on my end now.
Thank you!
I am using NetworkManager and previously had an older PKGBUILD of private-internet-access-vpn installed.