Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unable to install Pyradio on Win11 Pro 23H2 #277

Open
kjooleng opened this issue Feb 21, 2025 · 13 comments
Open

Unable to install Pyradio on Win11 Pro 23H2 #277

kjooleng opened this issue Feb 21, 2025 · 13 comments

Comments

@kjooleng
Copy link

System (please complete the following information):

  • OS: Win11 Pro 23H2
  • Python version: 3.12.9
  • pipx version (if applicable): NA
  • pipx installation method: NA
  • PyRadio Version: 0.9.3.11.4

Terminal output

Checking module: setuptools ...
Checking module: windows-curses ...
Checking module: pywin32 ...
Checking module: dnspython ...
Checking module: requests ...
Checking module: rich ...
Checking module: python-dateutil ...
Checking module: psutil ...
Checking module: patool ...
Checking module: pyunpack ...
Checking module: wheel ...
Checking module: win10toast ...
Checking module: py-cpuinfo ...
Traceback (most recent call last):
  File "C:\Users\kangjl\install.py", line 1523, in <module>
    uni.update_or_uninstall_on_windows(
  File "C:\Users\kangjl\install.py", line 888, in update_or_uninstall_on_windows
    isRunning()
  File "C:\Users\kangjl\install.py", line 179, in isRunning
    while WindowExists('PyRadio: ' + M_STRINGS['win-title']) or \
                                     ^^^^^^^^^
NameError: name 'M_STRINGS' is not defined

Additional comments
Anything else to add?

@s-n-g
Copy link
Collaborator

s-n-g commented Feb 21, 2025

Yeah... my bad...

Not hard to fix though...

Can you please edit the file (install.py) and add these lines at the top of the file?

M_STRINGS = {
	'session-locked': ' (Session Locked)',
	'win-title': 'Your Internet Radio Player',
}

so that the top of the file looks like this:

# -*- coding: utf-8 -*-
M_STRINGS = {
	'session-locked': ' (Session Locked)',
	'win-title': 'Your Internet Radio Player',
}
import locale
import sys
import os
import subprocess

Just make sure the white space at the beginning of the lines is all spaces (no tabs).

Then try executing the installation script again...

@kjooleng
Copy link
Author

Install completed. However no pyradio shortcut link was created

Checking module: setuptools ...
Checking module: windows-curses ...
Checking module: pywin32 ...
Checking module: dnspython ...
Checking module: requests ...
Checking module: rich ...
Checking module: python-dateutil ...
Checking module: psutil ...
Checking module: patool ...
Checking module: pyunpack ...
Checking module: wheel ...
Checking module: win10toast ...
Checking module: py-cpuinfo ...

Downloading PyRadio source code...
url: "https://github.com/coderholic/pyradio/archive/0.9.3.11.4.zip"
filename: "C:\Users\Kang JL\tmp-pyradio\pyradio-0.9.3.11.4.zip"
Extracting RyRadio source code...
Installing / Updating wheel
Installing / Updating setuptools
Installing / Updating pip
Installing / Updating rich
Installing / Updating requests
Installing / Updating py-cpuinfo
Processing c:\users\kang jl\tmp-pyradio\pyradio-source
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pywin32 in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 1)) (308)
Requirement already satisfied: windows-curses in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 2)) (2.4.1)
Requirement already satisfied: requests in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 3)) (2.32.3)
Requirement already satisfied: rich in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 4)) (13.9.4)
Requirement already satisfied: dnspython in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 5)) (2.7.0)
Requirement already satisfied: psutil in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 6)) (7.0.0)
Requirement already satisfied: wheel in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 7)) (0.45.1)
Collecting pylnk (from -r requirements.txt (line 8))
Downloading pylnk-0.2.tar.gz (13 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: win10toast in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 9)) (0.9)
Requirement already satisfied: python-dateutil in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 10)) (2.9.0.post0)
Requirement already satisfied: py-cpuinfo in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 11)) (9.0.0)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from requests->-r requirements.txt (line 3)) (3.4.1)
Requirement already satisfied: idna<4,>=2.5 in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from requests->-r requirements.txt (line 3)) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from requests->-r requirements.txt (line 3)) (2.3.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from requests->-r requirements.txt (line 3)) (2025.1.31)
Requirement already satisfied: markdown-it-py>=2.2.0 in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from rich->-r requirements.txt (line 4)) (3.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from rich->-r requirements.txt (line 4)) (2.19.1)
Requirement already satisfied: pypiwin32 in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from win10toast->-r requirements.txt (line 9)) (223)
Requirement already satisfied: setuptools in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from win10toast->-r requirements.txt (line 9)) (75.8.0)
Requirement already satisfied: six>=1.5 in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from python-dateutil->-r requirements.txt (line 10)) (1.17.0)
Requirement already satisfied: mdurl~=0.1 in c:\users\kang jl\appdata\local\programs\python\python312\lib\site-packages (from markdown-it-py>=2.2.0->rich->-r requirements.txt (line 4)) (0.1.2)
Building wheels for collected packages: pyradio, pylnk
Building wheel for pyradio (pyproject.toml) ... done
Created wheel for pyradio: filename=pyradio-0.9.3.11.4-py3-none-any.whl size=892635 sha256=3e6ce45e6b02f42094a76e525d140ed10e13800c445ce9f6b2a048bfc41266a2
Stored in directory: c:\users\kang jl\appdata\local\pip\cache\wheels\75\9d\0e\03077049ccc0c3f83a2b35683793d5c8ce295505abf07ddb8e
Building wheel for pylnk (setup.py) ... done
Created wheel for pylnk: filename=pylnk-0.2-py3-none-any.whl size=14334 sha256=e3357b703695725c5d66ccda020a38263124bc134467a9cb10075a1c81bbf6ae
Stored in directory: c:\users\kang jl\appdata\local\pip\cache\wheels\e5\b2\ca\89ad9aebc527d7f988dab761c98ab430e86bb542b95bea6dec
Successfully built pyradio pylnk
Installing collected packages: pylnk, pyradio
Successfully installed pylnk-0.2 pyradio-0.9.3.11.4

Access is denied.
Error occurred while processing: C:\Users\Kang.
Access is denied.
Error occurred while processing: C:\Users\Kang.
Traceback (most recent call last):
File "C:\Users\Kang JL\tmp-pyradio\pyradio-source\devel\reg.py", line 21, in
with open(bat, "w") as f:
^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: '"C:\Users\Kang JL\AppData\Roaming\pyradio\help\pyradio.bat"'
*** HTML files copyed to "C:\Users\Kang JL\AppData\Roaming\pyradio\help"
Downloading pylnk...
Installing pylnk...
*** Installing Dekstop Shortcut
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Kang JL\tmp-pyradio\pyradio-source\pyradio\win.py", line 734, in install_pyradio_link
copy(join(appdata, 'pyradio', 'help', 'PyRadio.lnk'),
File "C:\Users\Kang JL\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 435, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\Kang JL\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 260, in copyfile
with open(src, 'rb') as fsrc: ┌───────────────────────────┐
^^^^^^^^^^^^^^^ │Enter command number: │
FileNotFoundError: [Errno 2] No such file or └───────────────────────────┘L\AppData\Roaming\pyradio\help\PyRadio.lnk'
Cleaning up makedepend modules...

@s-n-g
Copy link
Collaborator

s-n-g commented Feb 22, 2025

The problem is right here:

Access is denied.
Error occurred while processing: C:\Users\Kang.
Access is denied.
Error occurred while processing: C:\Users\Kang.

And I'm pretty sure it id because of the space character that you have in your username Kang JL, judging by this one:

OSError: [Errno 22] Invalid argument: '"C:\Users\Kang JL\AppData\Roaming\pyradio\help\pyradio.bat"'

I have to create a Kang JL user on my Windows VM and look into it there...

Let me fire up my windows VM and see how we can get you to actually run the program, since it seems that the python package has been installed successfully...

@kjooleng
Copy link
Author

Also encounter this even though mpv already installed

PyRadio 0.9.3.11.4 [Session Locked] https://github.com/coderholic/pyradio
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ PyRadio is not able to use the player you specified. │
│ │
│ This means that either this particular player is not supported │
│ by PyRadio, or that you have simply misspelled its name. │
│ │
│ PyRadio currently supports two players: mplayer and vlc, │
│ automatically detected in this order. │
│ │
│ │
│ │
│ │
│ │
│ │

@s-n-g
Copy link
Collaborator

s-n-g commented Feb 22, 2025

ok, I see you can run the program, it will probably be

C:\Users\Kang JL\AppData\Local\Programs\Python\Python312\Scripts\pyradio.exe

and mpv should be under

C:\Users\Kang JL\AppData\Roaming\pyradio\mpv

Is that correct?

@kjooleng
Copy link
Author

For pyradio is correct location

Image

There is no mpv in that directory

Image

Image

@kjooleng
Copy link
Author

Isn't mpv supposed to be installed by default?

@kjooleng
Copy link
Author

Seems like mpv is found here

Image

However, folder is empty

Image

@s-n-g
Copy link
Collaborator

s-n-g commented Feb 22, 2025

It should have been installed automatically, but given the errors that occurred, who knows what happened.

You should go here:
https://sourceforge.net/projects/mpv-player-windows/files/64bit/
grub the latest release and unzip it into C:\Users\Kang JL\AppData\Roaming\pyradio\mpv, so that you have:

Image

@kjooleng
Copy link
Author

Great! Is working now.
Let me know when the install script has been updated.

Although shortcut link was not created, typing pyradio in the command prompt works.
Just like in Linux....

@s-n-g
Copy link
Collaborator

s-n-g commented Feb 22, 2025

Meanwhile you can just create a new shortcut on the Desktop:

Image

Thank you for the time invested to this project and for reporting this 👍

@kjooleng
Copy link
Author

Seems to work this way as well

Image

@kjooleng
Copy link
Author

Just have to drag it out to desktop and done

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants