deep5050 / radio-active

Play any radios around the globe right from the terminal :zap:
https://www.radio-browser.info/#/
MIT License
497 stars 25 forks source link

[Windows] ModuleNotFoundError: No module named 'pkg_resources' #101

Closed robinhood2014 closed 9 months ago

robinhood2014 commented 11 months ago

Describe the bug On Windows, when I run radio, I get the following error output:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\donni\AppData\Local\Programs\Python\Python312\Scripts\radio.exe\__main__.py", line 4, in <module>
  File "C:\Users\donni\AppData\Local\Programs\Python\Python312\Lib\site-packages\radioactive\__main__.py", line 11, in <module>
    from radioactive.handler import Handler
  File "C:\Users\donni\AppData\Local\Programs\Python\Python312\Lib\site-packages\radioactive\handler.py", line 10, in <module>
    from pyradios import RadioBrowser
  File "C:\Users\donni\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyradios\__init__.py", line 3, in <module>
    from pyradios.radios import RadioBrowser
  File "C:\Users\donni\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyradios\radios.py", line 6, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

To Reproduce Steps to reproduce the behavior:

  1. Open Windows PowerShell or PowerShell 7.
  2. Type radio with any or no parameters.
  3. See error

Expected behavior E.g. when running radio with no parameters, I expected a welcome message as described by Derek Taylor a.k.a. "DistroTube" at 5:25 of his video covering this app. Below this, I expected the program to print a message in red letters saying, "No station to play. please [sic] search for a station first!"

Screenshots I've enclosed two screenshots illustrating the different scenarios. The first screenshot is the result of the native Windows version; I obtained the second from running the same command in a Windows Subsystem for Linux (WSL) environment. Screenshot 2023-11-08 212557 Screenshot 2023-11-08 212415

Desktop

Additional context It's possible that this might not be a bug at all, but instead a result of me being a bonehead and forgetting to install a dependency for the native Windows version. Whatever the case may be, please let me know what's up.

github-actions[bot] commented 11 months ago

Hi, @robinhood2014, Thanks for your contribution :blue_heart: . Contributors :people_holding_hands: like you make the open source community :earth_africa: such an amazing place to learn :book: , inspire :angel:, and create :art: . We will investigate :eyes: and get back to you as soon as possible :+1: . Just make sure you have given us sufficient information :information_source:.

By that time enjoy this meme :point_down: , hope you like it :smile:

meme

Use this action on your projects. Use jokes on issues instead.

WyntrHeart commented 11 months ago

Same issue on Android 9 using Termux

WyntrHeart commented 11 months ago

Fixed this by installing "setuptools" which provides the module "pkg_resources". Since pip doesn't install this package automatically it should be listed as a dependency for radio-active

robinhood2014 commented 11 months ago

@WyntrHeart Confirmed fixed on Windows. I'm not sure why Python pulls in the "pkg_resources" module by default on desktop Linux but not on any other platform.

deep5050 commented 11 months ago

Thank you for the bug working..