Re: youtube-dl python issue, SyntaxError: (unicode error)

2022-12-17 Thread Mikolaj Kucharski
On Sat, Dec 17, 2022 at 11:40:35AM +, Stuart Henderson wrote:
> On 2022/12/17 11:18, Mikolaj Kucharski wrote:
> > $ youtube-dl -F https://youtu.be/YGdYhvk6xyw
> > Traceback (most recent call last):
> ..
> > from ..compat import compat_os_name
> >   File "/usr/local/lib/python3.10/site-packages/youtube_dl/compat.py", line 
> > 2368, in 
> > import http.server as compat_http_server
> >   File "/usr/local/lib/python3.10/http/server.py", line 102, in 
> > import socketserver
> >   File "/usr/local/lib/python3.10/socketserver.py", line 119
> > """
> >^
> > SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xee in 
> > position 2: invalid continuation byte
> > 
> 
> No such problem here. Is there anything strange about the contents of
> /usr/local/lib/python3.10/socketserver.py on your machine? If it looks
> corrupt, try reinstalling Python (pkg_add -r -D installed python%3.10)
> 

Hm... Yeah, thanks, that seems to be the problem O_o


$ cksum -a sha256 -b - < /usr/local/lib/python3.10/socketserver.py
lODUo6wOKmwvv4ONuJGtrMMI4YT7LPtwiY0TujxOQE8=

# time pkg_check
Packing-list sanity: ok
Direct dependencies: ok
Reverse dependencies: ok
Files from packages: ok
--- python-3.10.8p4 ---
checksum for /usr/local/lib/python3.10/socketserver.py does not match
5m02.54s real 2m37.04s user 1m10.34s system

# pkg_add -r -D installed python%3.10
quirks-6.88 signed on 2022-12-15T21:12:19Z
quirks-6.88->6.88: ok
python-3.10.8p4->3.10.8p4: ok
Read shared items: ok

$ cksum -a sha256 -b - < /usr/local/lib/python3.10/socketserver.py
lODUo6wOKmwvv4ONuJGtrMMI4YT7LPtwiY0TujxOQE8=

# pkg_add -r -D installed -D donttie python%3.10
quirks-6.88 signed on 2022-12-15T21:12:19Z
quirks-6.88->6.88: ok
python-3.10.8p4->3.10.8p4: ok
Read shared items: ok

$ cksum -a sha256 -b - < /usr/local/lib/python3.10/socketserver.py
WQB5Fs8vVAGFv0fzvjVkjVFBucD0ZoshSQDEw1A3F54=

# time pkg_check
Packing-list sanity: ok
Direct dependencies: ok
Reverse dependencies: ok
Files from packages: ok
3m48.36s real 2m33.37s user 0m49.87s system

$ hexdump -vC /tmp/bad > /tmp/socketserver.py.bad
$ hexdump -vC /tmp/good > /tmp/socketserver.py.good
$ diff -u /tmp/socketserver.py.*
--- /tmp/socketserver.py.badSat Dec 17 12:18:02 2022
+++ /tmp/socketserver.py.good   Sat Dec 17 12:18:08 2022
@@ -1,4 +1,4 @@
-  22 22 22 47 65 ee 65 72  69 63 20 73 6f 63 6b 65  |"""Ge.eric socke|
+  22 22 22 47 65 6e 65 72  69 63 20 73 6f 63 6b 65  |"""Generic socke|
 0010  74 20 73 65 72 76 65 72  20 63 6c 61 73 73 65 73  |t server classes|
 0020  2e 0a 0a 54 68 69 73 20  6d 6f 64 75 6c 65 20 74  |...This module t|
 0030  72 69 65 73 20 74 6f 20  63 61 70 74 75 72 65 20  |ries to capture |

$ echo "ibase=16;obase=2;E" | bc
1110
$ echo "ibase=16;obase=2;6" | bc
110

-- 
Regards,
 Mikolaj



Re: youtube-dl python issue, SyntaxError: (unicode error)

2022-12-17 Thread Stuart Henderson
On 2022/12/17 11:18, Mikolaj Kucharski wrote:
> $ youtube-dl -F https://youtu.be/YGdYhvk6xyw
> Traceback (most recent call last):
..
> from ..compat import compat_os_name
>   File "/usr/local/lib/python3.10/site-packages/youtube_dl/compat.py", line 
> 2368, in 
> import http.server as compat_http_server
>   File "/usr/local/lib/python3.10/http/server.py", line 102, in 
> import socketserver
>   File "/usr/local/lib/python3.10/socketserver.py", line 119
> """
>^
> SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xee in position 
> 2: invalid continuation byte
> 

No such problem here. Is there anything strange about the contents of
/usr/local/lib/python3.10/socketserver.py on your machine? If it looks
corrupt, try reinstalling Python (pkg_add -r -D installed python%3.10)



youtube-dl python issue, SyntaxError: (unicode error)

2022-12-17 Thread Mikolaj Kucharski
Hi,

Do you guys see the same by any chance?

$ pkg_info -qI youtube-dl
youtube-dl-2021.12.17p1

$ sysctl -n kern.version
OpenBSD 7.2-current (GENERIC.MP) #859: Sat Nov 26 11:10:04 MST 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

$ pkg_info -f quirks | grep -e '^@digital-signature'
@digital-signature signify2:2022-12-12T02:36:47Z:external


$ youtube-dl -F https://youtu.be/YGdYhvk6xyw
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl", line 5, in 
from youtube_dl import main
  File "/usr/local/lib/python3.10/site-packages/youtube_dl/__init__.py", line 
15, in 
from .options import (
  File "/usr/local/lib/python3.10/site-packages/youtube_dl/options.py", line 8, 
in 
from .downloader.external import list_external_downloaders
  File 
"/usr/local/lib/python3.10/site-packages/youtube_dl/downloader/__init__.py", 
line 3, in 
from .common import FileDownloader
  File 
"/usr/local/lib/python3.10/site-packages/youtube_dl/downloader/common.py", line 
9, in 
from ..compat import compat_os_name
  File "/usr/local/lib/python3.10/site-packages/youtube_dl/compat.py", line 
2368, in 
import http.server as compat_http_server
  File "/usr/local/lib/python3.10/http/server.py", line 102, in 
import socketserver
  File "/usr/local/lib/python3.10/socketserver.py", line 119
"""
   ^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xee in position 
2: invalid continuation byte

-- 
Regards,
 Mikolaj