LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-06-2024, 03:48 AM   #16
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337

I connected this morning, trapped the 70k or so of errors. Rather than pollute this forum, they are on pastebin.com in case they give anyone any insights. I checked, and am connected, but it's ugly, if repetitive.
 
Old 04-06-2024, 04:43 AM   #17
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
you have a logging error:
Quote:
UnicodeEncodeError: 'charmap' codec can't encode character '\u2014' in position 24: character maps to <undefined>
which means incorrect/invalid locale settings (or something similar), but it is just the logging.
Otherwise you can see lines beginning with Message:
Code:
Message: '###########################'
Message: '### NEW PROCESS STARTED ###'
Message: '###########################'
Message: ['/usr/bin/protonvpn', 'connect', '--cc', 'ie']
Message: 'USER: root'
Message: 'CONFIG_DIR: /root/.pvpn-cli'
Message: "Arguments\n{'--cc': 'ie', '--fastest': False, '--help': False, '--p2p': False, '--random': False, '--sc': False, '--tor': False, '--version': False, '-p': None, '<servername>': None, 'c': False, 'configure': False, 'connect': True, 'd': False, 'disconnect': False, 'examples': False, 'init': False, 'r': False, 'reconnect': False, 'refresh': False, 's': False, 'status': False}"
Message: 'Starting fastest country connect'
Message: 'Initiating disconnect'
Message: 'Checking connection Status. OpenVPN processes: 0'
Message: 'Restoring DNS'
Message: 'No Backupfile found'
Message: 'Restoring ip6tables'
Message: 'No Backupfile found'
Message: 'Restoring iptables'
Message: 'No Backupfile found'
Message: 'No connection found'
Message: 'Initiating API Call: https://api.protonvpn.ch/vpn/logicals'
Message: 'Successful json response'
Message: 'SERVER_INFO_FILE written'
Message: 'last_api_call updated'
Message: 'Reading servers from file'
Message: 'Returning fastest server with pool size 1'
Message: 'Initiating OpenVPN connection'
Message: 'Connecting to IE#19 via UDP'
Message: 'Reading servers from file'
Message: 'Rendered /root/.pvpn-cli/connect.ovpn from openvpn_template.j2'
Message: 'Initiating disconnect'
Message: 'Checking connection Status. OpenVPN processes: 0'
Message: 'Restoring DNS'
Message: 'No Backupfile found'
Message: 'Restoring ip6tables'
Message: 'No Backupfile found'
Message: 'Restoring iptables'
Message: 'No Backupfile found'
Message: 'No connection found'
Message: 'Getting IP Information'
Message: 'Initiating API Call: https://api.protonvpn.ch/vpn/location'
Message: 'Successful json response'
Message: 'OpenVPN process started'
Message: 'Writing dns_server to [metadata] in config file'
Message: 'Leak Protection initiated'
Message: 'DNS Leak Protection is enabled'
Message: '/etc/resolv.conf (resolv.conf) backed up'
Message: 'Removed existing DNS Servers'
Message: 'Added ProtonVPN or custom DNS'
Message: 'Writing resolvconf_hash to [metadata] in config file'
Message: 'Disabling IPv6'
Message: 'Backing up ip6tables rules'
Message: 'IPv6 disabled successfully'
Message: 'Getting IP Information'
Message: 'Initiating API Call: https://api.protonvpn.ch/vpn/location'
Message: 'Successful json response'
Message: 'Connection successful'
Message: 'Writing connection info to file'

ProtonVPN now offers an official Linux app which includes a graphical user interface.
Visit https://protonvpn.com/support/official-linux-client to upgrade.
Connecting to IE#19 via UDP...
Connected!
 
1 members found this post helpful.
Old 04-06-2024, 10:56 AM   #18
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Quote:
Originally Posted by pan64 View Post
you have a logging error:

which means incorrect/invalid locale settings (or something similar), but it is just the logging.
Otherwise you can see lines beginning with Message:{SNIPPED!}
Bang on, @pan64 & thanks for the reply. I ran the line
Code:
root@Ebony:~# protonvpn connect --cc ie 2>/dev/null

ProtonVPN now offers an official Linux app which includes a graphical user interface.
Visit https://protonvpn.com/support/official-linux-client to upgrade.
There is already a VPN connection running.
Terminating previous connection...
Connecting to IE#3 via UDP...
Connected!
and it connected normally. The funny thing, when the init scripts are running, the protonvpn output is fairly normal
So it is logging errors only, and not function. I then compared the user & root environments, went through /etc/environment (but everything is set elsewhere), /etc/profile & /etc/profile.d/ to no avail. I'm on en_IE@euro and the Europe/Dublin timezone, which was no issue before. Yet I see that error with "\u2014" as well. Just in case I'm missing the obvious, here's root's printenv o/p. I unset $LS_COLORS because it reads some lengthy file in which has nothing to do with this issue.
Code:
root@Ebony:~# LS_COLORS=""
root@Ebony:~# printenv
SHELL=/bin/bash
COLORTERM=truecolor
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig
G_BROKEN_FILENAMES=1
HOSTNAME=Ebony
MINICOM=-c on
JAVA_HOME=/usr/lib64/java
PWD=/root
LOGNAME=root
MANPATH=:/usr/lib64/java/man:/usr/lib64/java/man
XAUTHORITY=/root/.xauthXFoso9
TZ=Europe/Dublin
LS_OPTIONS=-F -b -T 0 --color=always
HOME=/root
LANG=en_IE@euro
LS_COLORS=
TERM=xterm-256color
LESSOPEN=|lesspipe.sh %s
USER=root
T1LIB_CONFIG=/usr/share/t1lib/t1lib.config
DISPLAY=:0
SHLVL=1
INPUTRC=/etc/inputrc
PS2=> 
PS1=\u@\h:\w\$ 
NODE_PATH=/usr/lib64/node_modules
QT5DIR=/usr/lib64/qt5
VDPAU_LOG=0
PATH=/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/games:/usr/lib64/java/bin:/usr/lib64/java/jre/bin:/usr/lib64/java/bin:/usr/lib64/qt5/bin:/usr/lib64/qt6/bin
QT6DIR=/usr/lib64/qt6
_=/usr/bin/printenv
$LC_ALL is unset, but I set it to "en_IE@euro", and "C" and things behaved no better. /var/log/messages just logs creating tun0 (=proton0) when the vpn is booted, /var/log/syslog logs nothing. On bootup, the protonvpn output that I see looks clean, and doesn't throw errors. But if I re-run it later, it's the usual mess. What is character 'u\2014' anyhow?
 
Old 04-06-2024, 11:02 AM   #19
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
https://symbl.cc/en/2014/
 
Old 04-06-2024, 11:35 AM   #20
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Quote:
Originally Posted by pan64 View Post
Weird. I'm presuming the python code doesn't have it, and English doesn't use it. Russian does use it, and some derivitative languages may do also. I even took it out of my hacked keyboard file, it’s not in the configs. It seems to be a shortcoming in python’s charmap, wherever that comes from. But I have no clue why it's trying to interpret it.
 
Old 04-06-2024, 12:56 PM   #21
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,146
Blog Entries: 6

Rep: Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834
Quote:
What is character 'u\2014' anyhow?
Unicode. What encoding is your python using by default? '\u2014' is a 16 bit hex value.

Code:
python
Python 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import locale
>>> locale.getpreferredencoding()
'UTF-8'

>>> print('\u2014')
—

>>> '—'.encode('utf-8')
b'\xe2\x80\x94'

>>> b'\xe2\x80\x94'.decode('utf-8')
'—'

>>> import unicodedata
>>> unicodedata.name('—')
'EM DASH'

>>> unicodedata.lookup('EM DASH')
'—'

>>> with open('testfile.txt', 'w') as f:
...     f.write('—')
... 
1
 
Old 04-07-2024, 06:46 AM   #22
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Quote:
Originally Posted by tekk
> What is character 'u\2014' anyhow?
Unicode. What encoding is your python using by default? '\u2014' is a 16 bit hex value.
Thanks for the reply. Yes, u\2014=emdash, an overly long hyphen. It's all part of this vast spew of error messages which I am piping to /dev/null, atm. It's not a solution I like, but I can't do much else. Python3.9.x worked fine, python3.11.x throws a major hissy fit, but actually works for connect and disconnect commands. That's about the last thing I thought was happening.

I don't know if this is a python3.11 bug, or protonvpn-cli bug. I suspect python3.11.x because protonvpn are a Swiss outfit, and are surrounded by Unicode. The pastebin output from post #16 (all 70k of it) shows what I'm seeing. I have a protonvpn issue open, so I'll update that.
 
Old 04-08-2024, 12:48 AM   #23
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
No, it is definitely not a python bug, but an incorrect setup/env. Most probably encoding is not set properly. In post #21 you can see it works. Python is not responsible for the encoding you set and the text you want to handle (containing whatever is inside).
 
Old 04-08-2024, 05:07 AM   #24
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Quote:
Originally Posted by pan64 View Post
No, it is definitely not a python bug, but an incorrect setup/env. Most probably encoding is not set properly. In post #21 you can see it works. Python is not responsible for the encoding you set and the text you want to handle (containing whatever is inside).
Here's the setup:
Code:
dec@Ebony:~$ locale
LANG=en_IE@euro
LC_CTYPE="en_IE@euro"
LC_NUMERIC="en_IE@euro"
LC_TIME="en_IE@euro"
LC_COLLATE="en_IE@euro"
LC_MONETARY="en_IE@euro"
LC_MESSAGES="en_IE@euro"
LC_PAPER="en_IE@euro"
LC_NAME="en_IE@euro"
LC_ADDRESS="en_IE@euro"
LC_TELEPHONE="en_IE@euro"
LC_MEASUREMENT="en_IE@euro"
LC_IDENTIFICATION="en_IE@euro"
LC_ALL=
dec@Ebony:~$ echo $TZ  
Europe/Dublin
I certainly don't know where they came from. Sure, I set up 'en_IE@euro' as my locale and 'Europe/Dublin as the timezone, but that's it.
 
Old 04-08-2024, 05:55 AM   #25
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
https://wiki.archlinux.org/title/locale
you may need to set codeset (or encoding)
 
Old 04-08-2024, 07:14 AM   #26
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Quote:
Originally Posted by pan64 View Post
https://wiki.archlinux.org/title/locale
you may need to set codeset (or encoding)
Nice try, but I'm on Slackware and the approach is very different. Slackware is a distro from the early days. Slackware installs all the common locales and they just percolate down once you set them. My fairly bare slackware install here is 26G. Debian, by contrast installs only about 6G.
 
Old 04-08-2024, 07:22 AM   #27
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,849

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Quote:
Originally Posted by business_kid View Post
I set up 'en_IE@euro' as my locale
I guess there would be no problem with 'en_IE.utf8'.
 
Old 04-08-2024, 07:38 AM   #28
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 362

Rep: Reputation: 200Reputation: 200Reputation: 200
Quote:
Originally Posted by Petri Kaukasoina View Post
I guess there would be no problem with 'en_IE.utf8'.
Yep, because en_IE@euro locale uses ISO-8859-15 encoding which can't handle Unicode symbol EM DASH:
Code:
$ LANG=en_IE@euro python
>>> print('\u2014')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.11/encodings/iso8859_15.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u2014' in position 0: character maps to <undefined>
Need to use locale with UTF-8 encoding for that to work.
 
Old 04-08-2024, 12:59 PM   #29
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,146
Blog Entries: 6

Rep: Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834
Code:
python -c 'import sys; print(sys.getdefaultencoding())'

python -c 'import sys; print(sys.stdin.encoding, sys.stdout.encoding)'
 
Old 04-09-2024, 09:08 AM   #30
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Thanks for the continued interest in this thread, guys.
Quote:
Originally Posted by Petri Kaukasoina
I guess there would be no problem with 'en_IE.utf8'.
Brilliant. There isn't, and I never appreciated the difference. That solves all of the log spam. I tried all the suggestions, and you can see the results in the terminal o/p below.
Code:
dec@Ebony:~$ locale
LANG=en_IE.utf8
LC_CTYPE="en_IE.utf8"
LC_NUMERIC="en_IE.utf8"
LC_TIME="en_IE.utf8"
LC_COLLATE=C
LC_MONETARY="en_IE.utf8"
LC_MESSAGES="en_IE.utf8"
LC_PAPER="en_IE.utf8"
LC_NAME="en_IE.utf8"
LC_ADDRESS="en_IE.utf8"
LC_TELEPHONE="en_IE.utf8"
LC_MEASUREMENT="en_IE.utf8"
LC_IDENTIFICATION="en_IE.utf8"
LC_ALL=
dec@Ebony:~$ su -
Password: 

-su: export: `1': not a valid identifier
root@Ebony:~# protonvpn status

ProtonVPN now offers an official Linux app which includes a graphical user interface.
Visit https://protonvpn.com/support/official-linux-client to upgrade.
Traceback (most recent call last):
  File "/usr/bin/protonvpn", line 33, in <module>
    sys.exit(load_entry_point('protonvpn-cli==2.2.12', 'console_scripts', 'protonvpn')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/protonvpn_cli/cli.py", line 72, in main
    cli()
  File "/usr/lib/python3.11/site-packages/protonvpn_cli/cli.py", line 144, in cli
    connection.status()
  File "/usr/lib/python3.11/site-packages/protonvpn_cli/connection.py", line 444, in status
    + "Features:     {0}\n".format(all_features[feature])
                                   ~~~~~~~~~~~~^^^^^^^^^
KeyError: 8
root@Ebony:~# python -c 'import sys; print(sys.getdefaultencoding())'
utf-8
root@Ebony:~# python -c 'import sys; print(sys.stdin.encoding, sys.stdout.encoding)'
utf-8 utf-8
root@Ebony:~# LANG=en_IE@euro
root@Ebony:~# python -c 'import sys; print(sys.getdefaultencoding())'
utf-8
root@Ebony:~# python -c 'import sys; print(sys.stdin.encoding, sys.stdout.encoding)'
iso8859-15 iso8859-15
root@Ebony:~# LANG-en_IE.utf-8
-su: LANG-en_IE.utf-8: command not found
root@Ebony:~# LANG=en_IE.utf-8
root@Ebony:~# python -c 'import sys; print(sys.getdefaultencoding())'
utf-8
root@Ebony:~# python -c 'import sys; print(sys.stdin.encoding, sys.stdout.encoding)'
utf-8 utf-8
root@Ebony:~#
The error on the 'protonvpn status' command happens only under X. If I hit 'Ctrl_Alt_F3' and open a root console there, no such error occurs The init scripts all run in runlevel 3 anyhow, so everything behaves cleanly. I also discovered the hard way that "2 > /dev/null" throws errors, but '2> /dev/null' does not.

@tekk: Thanks for the test lines. As the $LANG variable set in /etc/profile.d/lang.sh sets all the other $LC_* variables, I feel the 'utf-8' which I coloured in red would be gone at the next reboot. I only set the old value in one terminal, which didn't affect any other setting.

I'm now only left with the error on the 'protonvpn status' command, which occurs under X only. I also have that nutty "-su: export: `1': not a valid identifier" thing. It occurs for users and root. Every environment variable exported seems well formed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] current: python-requests-2.22.0 conflict with python-idna-2.9 marrowsuck Slackware 2 02-20-2020 06:20 AM
I got error while installing python-tk python-psycopg2 python-twisted saili kadam Linux - Newbie 1 09-05-2015 03:03 AM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
python: can you update the current shell from python? BrianK Programming 4 01-31-2008 12:18 AM
python problem - compiled from source - python -V still showing old version txm123 Linux - Newbie 1 02-15-2006 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration