Error when starting Sonospy

57 views
Skip to first unread message

69li...@gmail.com

unread,
Sep 11, 2017, 6:44:28 PM9/11/17
to Sonospy Development
Hello!

I feel as if I am so close to getting this up and running, but have stumbled on an error I'm hoping somebody here can help me solve.
First of all, I have read and followed the Installation and Quick Config guide by Bart S. (I fabulous doc, thanks!). I installed Python27, unzipped the Sonospy download, etc.
I am on Windows 7. I have opened all the ports according to the guide, created a DB with a scan and log that confirms my intention. My music is stored on a DLNA  NAS drive. I've put some test music in a folder named "Leathco" which I believe in Sonospy speak is my proxy (this location was successfully found and confirmed in the scan and log previously mentioned). I moved on to "starting" Sonospy. When I ran the scan on the log, I logged the following info which includes an error:

Args:
option.proxyonly: True
option.register: True
    Music service: Sonospy=Leathco,Sonospy.db
Proxy. Name: Leathco
ERROR: Traceback (most recent call last):
  File "pycpoint.py", line 711, in __init__
    wmptype=wmptype, index_icons=self.index_icons)
  File "C:\Python27\Sonospy\sonospy\proxy.py", line 191, in __init__
    raise ValueError(error)
ValueError: Unable to access database file

>>>> new device (from controller):  - Sonos CONNECT at http://  udn: uuid:RINCON_B8E93794381801400
>>>> new device (from controller):  - Sonos PLAY:1 at http://  udn: uuid:RINCON_B8E937EB99B201400
>>>> new device (from controller):  - Sonos PLAY:3 at http://  udn: uuid:RINCON_B8E937327B9801400
>>>> new device (from controller):  - Sonos PLAY:3 at http://  udn: uuid:RINCON_B8E93737F7BC01400
>>>> new device (from controller):  - Sonos PLAY:3 at http://  udn: uuid:RINCON_000E58F230E801400
>>>> new device (from controller):  - Sonos CONNECT at http://  udn: uuid:RINCON_B8E93795824601400
>>>> new device (from controller):  - Sonos PLAY:1 at http://  udn: uuid:RINCON_B8E937EFE57201400
>>>> new device (from controller):  - Sonos PLAY:3 at http://  udn: uuid:RINCON_B8E9373B83D801400
>>>> new device (from controller):  - Sonos PLAY:3 at http://  udn: uuid:RINCON_B8E93736678801400
>>>> new device (from controller): - Sonos PLAY:1 at http://  udn: uuid:RINCON_B8E937B2090801400
>>>> new device (from controller):  Sounds at http://  udn: uuid:5f9ec1b3-ed59-1900-4530-00a0de1b0fff
>>>> new device (from controller):  (Gateway) at http://  udn: uuid:e74fe463-6af4-a26c-378b-bcac00b9d3c0
>>>> new device (from controller): NetServer : PVConnect: Windows Media Connect at http://  udn: uuid:7076436f-6e65-1063-8074-00d0b815c439

At this point I'm at a loss what this error means or how to correct it. Any thoughts or suggestions?
Thanks in advance, Scott



Mark Henkelis

unread,
Sep 11, 2017, 7:16:07 PM9/11/17
to sonosp...@googlegroups.com
Hi,

That error means that Sonospy cannot find/access the database file you specify. From your log it's looking for a database called Sonospy.db - it will look for it in the sonospy folder by default.

Did you scan to a database called Sonospy.db, and is it in the sonospy folder (the one with all the .py files in, within the one where you installed Sonospy)?

Mark.
--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.
To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

69li...@gmail.com

unread,
Sep 13, 2017, 1:10:32 PM9/13/17
to Sonospy Development
Yes to all of that. The Folder Structure is:
C:\Python27\Sonospy\Sonospy\Sonospy.db.
It was easiest for me to keep everything in one Folder and it's subsets. I have the "double" Sonospy\Sonospy\" structure as that is how the zip file extracted and that is how it is constantly referred to in Bart's guide. Is there anything wrong with my folder structure that I should change?
Thanks-Scott

Mark Henkelis

unread,
Sep 13, 2017, 7:27:20 PM9/13/17
to sonosp...@googlegroups.com
No, that folder structure is fine - which folder were you in when you started Sonospy, and how did you start it (what command line did you use)?

69li...@gmail.com

unread,
Sep 15, 2017, 1:44:06 PM9/15/17
to Sonospy Development
I started it within this folder: C:\Python27\Sonospy\sonospy
This is the same folder that contains all the file *.py and *pyc files as well as the database.

This is the command I used:

python pycpoint.py -p -sSonospy=Sonospy,Sonospy.db -r> start.log

Mark Henkelis

unread,
Sep 15, 2017, 6:48:47 PM9/15/17
to sonosp...@googlegroups.com
I've just run that same command line on a fresh install on a Windows machine.

When I run it without first creating Sonospy.db, I get the "Unable to access database file" error.

If I run a scan to that database first, Sonospy starts normally.

Is it possible that the user you are using does not have access rights to the database file you created? What do you get with:

    dir /Q Sonospy.db

I'm assuming that is a comma between the proxy and database names on the command line.

69li...@gmail.com

unread,
Sep 15, 2017, 9:13:48 PM9/15/17
to Sonospy Development
When I run the below command I get this:
 Volume in drive C is SSD-Windows
 Volume Serial Number is DA18-9C43
 Directory of C:\Python27\Sonospy\sonospy
 Directory of C:\Python27\Sonospy\sonospy

I checked permissions, and enabled my user rights on both the Sonosby.db as well as the command file I wrote. After doing that, I started Sonospy but still received the error that it could not access database file. I deleted the db, ran the Scan command again, and received the following which I take to mean the db was created successfully:
Database: C:\Python27\Sonospy\sonospy\Sonsopy.db
Scanning: \\Nettex\media\Leathco
Scannumber: 1
New file found: 01 Guide Vocal_Turn It On Again.mp3, \\Nettex\media\Leathco\David Palmer (Genesis)\We Know What We Like - The Music Of Gene
New file found: 02 Mad Man Moon.mp3, \\Nettex\media\Leathco\David Palmer (Genesis)\We Know What We Like - The Music Of Gene
New file found: 03 Entangled.mp3, \\Nettex\media\Leathco\David Palmer (Genesis)\We Know What We Like - The Music Of Gene
New file found: 04 Medley_ Los Jigos- Duke's Travels.mp3, \\Nettex\media\Leathco\David Palmer (Genesis)\We Know What We Like - The Music Of Gene
New file found: 05 Follow You, Follow Me.mp3, \\Nettex\media\Leathco\David Palmer (Genesis)\We Know What We Like - The Music Of Gene
New file found: 06 I Know What I Like.mp3, \\Nettex\media\Leathco\David Palmer (Genesis)\We Know What We Like - The Music Of Gene
New file found: 07 Medley_ Snowbound - Snowbound_Sce.mp3, \\Nettex\media\Leathco\David Palmer (Genesis)\We Know What We Like - The Music Of Gene
New file found: 08 Horizons.mp3, \\Nettex\media\Leathco\David Palmer (Genesis)\We Know What We Like - The Music Of Gene
New file found: 09 Can-Utility And The Coastliners.mp3, \\Nettex\media\Leathco\David Palmer (Genesis)\We Know What We Like - The Music Of Gene
New file found: 10 Undertow_Supper's Ready.mp3, \\Nettex\media\Leathco\David Palmer (Genesis)\We Know What We Like - The Music Of Gene
Processing tags
Tags processed
python ./gettags.py -d Sonsopy.db -v \\\\Nettex\\media\\Leathco
python ./movetags.py -s Sonsopy.db -d Sonsopy.db -v

I started Sonospy again, and my log exactly matched the one at the start of this thread, including "ValueError: Unable to access database file"

Thanks for all your help!

Mark Henkelis

unread,
Sep 16, 2017, 8:05:05 AM9/16/17
to sonosp...@googlegroups.com
I think there's a typo in the database name below (Sonsopy.db), assuming you're using the same Sonospy command line as before (Sonospy.db).

I've attached a simplified module that uses the code from Sonospy that tries to access the database - can you run that from the C:\Python27\Sonospy\sonospy folder please and post the results please.
checkdb.py

69li...@gmail.com

unread,
Sep 16, 2017, 12:51:53 PM9/16/17
to Sonospy Development
Hello Mark!

I ran the code below but never saw a log or file. However, your remark about the typo was the key to SUCCESS! I had indeed misspelled the database. I can't thank you enough for all your help.

So hopefully, one (or two) last questions:
- as I read Bart's guide I feel safe in assuming that in a Windows environment I must leave the Command Window open. (Sidebar, Bart also advises closing this window and ending "python.exe" from the Task Manager before updating the Data Base file (if/when new music is added).
-with this Command Window open, how much does this drain the computer's resources?
-is it advisable to put this on an old machine (such as a Laptop) and just let it run so it doesn't interfere with my main computer?

Again, thanks so much for your tenacity in helping me with this problem, and even bigger thanks for helping all of us who love our Sonos over come the 65k song limit.

Best,
Scott

Mark Henkelis

unread,
Sep 16, 2017, 1:16:42 PM9/16/17
to sonosp...@googlegroups.com
Great that you got it working.

> - as I read Bart's guide I feel safe in assuming that in a Windows
> environment I must leave the Command Window open. (Sidebar, Bart also
> advises closing this window and ending "python.exe" from the Task
> Manager before updating the Data Base file (if/when new music is added).

You can run with pythonw, which doesn't use a command window
(sonos_p.cmd uses that method) - to end that you'll have to end pythonw
in the task manager

> -with this Command Window open, how much does this drain the
> computer's resources?
> -is it advisable to put this on an old machine (such as a Laptop) and
> just let it run so it doesn't interfere with my main computer?
>

I doubt it will use many resources. If you're not playing music it will
won't be doing anything, if you are it's only serving the music file.
You could monitor it in task manager. Obviously you can just leave it
running on another machine, someone has it running on a Raspberry Pi.
Reply all
Reply to author
Forward
0 new messages