devsnd / cherrymusic

Stream your own music collection to all your devices! The easy to use free and open-source music streaming server.
http://www.fomori.org/cherrymusic
GNU General Public License v3.0
1.03k stars 189 forks source link

[Windows] Failed to load file browser #662

Open mapomme1108 opened 7 years ago

mapomme1108 commented 7 years ago

Hello,

I have this error message when I click on "Browse File" : "Failed to load file browser"

Here is my --info

CherryMusic Server 0.39.1

CherryPy: 10.1.1
Python: CPython 3.6.0
Platform: Windows-10-10.0.14393-SP0

configuration dir:
    C:\Users\François\AppData\Roaming\cherrymusic
server data dir:
    C:\Users\François\AppData\Roaming\cherrymusic
static resources dir:
    C:\Cherrymusic\
server package dir:
    C:\Cherrymusic\cherrymusicserver
process working dir:
    C:\Cherrymusic

locale: (None, None), default: ('fr_FR', 'cp1252')
filesystem encoding: utf-8

Available Decoders:
    mp3 (ffmpeg)
    wma (ffmpeg)
    ogg (ffmpeg)
    oga (ffmpeg)
    flac (flac)
    m4a (ffmpeg)
Available Encoders:
    ogg (oggenc)
    mp3 (lame)
    flac (flac)
mapomme1108 commented 7 years ago

I try "python setup.py install" and, at the end of the installation, there is this message:

Adding CherryMusic 0.39.1 to easy-install.pth file
Traceback (most recent call last):
  File "setup.py", line 153, in <module>
    setup(**setup_options)
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\command\install.py", line 67, in run
    self.do_egg_install()
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\command\install.py", line 117, in do_egg_install
    cmd.run()
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\command\easy_install.py", line 410, in run
    self.easy_install(spec, not self.no_deps)
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\command\easy_install.py", line 646, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\command\easy_install.py", line 697, in install_item
    self.process_distribution(spec, dist, deps)
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\command\easy_install.py", line 722, in process_distribution
    self.install_egg_scripts(dist)
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\command\easy_install.py", line 600, in install_egg_scripts
    dist.get_metadata('scripts/' + script_name)
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\command\easy_install.py", line 801, in install_script
    self.write_script(script_name, _to_ascii(script_text), 'b')
  File "C:\Users\François\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\command\easy_install.py", line 106, in _to_ascii
    return s.encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe7' in position 15: ordinal not in range(128)
tilboerner commented 7 years ago

Hey, sorry for all the trouble, and thanks for including all that info. (By the way, to make code blocks in Markdown, start and end the block with ``` on separate lines.)

It would be nice to also see some output of the server console from the time you try to load the file browser; there should be some error output there. I'm suspecting an encoding error, especially if there are any names with accented characters directly in your music "basedir" - but please post the error output to make sure what exactly is happening.

Setuptools has a known problem with non-ascii. Looks like it is choking on the "ç" in your home path somehow (ç is code point 231, which is e7 in hexadecimal). Running setup.py install is not necessary for Cherrymusic and so easily avoided, but at least it's another hint at encoding trouble.

mapomme1108 commented 7 years ago

Hello,

I solve the problem

In the setup page of CherryMusic, I was using this path: //NAS/Multimedia/Musique but I should be using this one: \\NAS\Multimedia\Musique

It works fine now!!

Thank you for this software