DB error on initial Scan RaspberryPi

37 views
Skip to first unread message

Peter Hood

unread,
Apr 30, 2020, 5:32:22 PM4/30/20
to sonosp...@googlegroups.com
This is a rasberriPI 4 installation using 2020-02-13-raspbian-buster-lite.img.  I connected to my Synology NAS.  I think I followed the directions and got the permissions correct.


my permission are
drwxrwxr-x 5 sonos sonos 4096 Apr 30 17:49 sonos

It is acting like I don’t have permissions


Any insight would be appraised 



Initial dump 
Error creating database: /home/sonos/sqhpeh/chickadee/sspy/sonospy/-v : database is locked
Database: /home/sonos/sqhpeh/chickadee/sspy/sonospy/-v
Scanning: PeterMusic.db
** EXITING on unhandled exception - See errors/ErrorDump-20200430-222136.txt
./gettags.py -d -v PeterMusic.db /home/sonos/sqhpeh/musicTEST




ErrorDump-20200430-222136.txt

<class 'sqlite3.OperationalError'>
Python 2.7.16: /usr/bin/python
Thu Apr 30 22:21:36 2020

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 /home/sonos/sqhpeh/chickadee/sspy/sonospy/gettags.py in <module>()
 2937
 2938 if __name__ == "__main__":
 2939     status = main()
 2940     sys.exit(status)
 2941
status undefined
main = <function main>

 /home/sonos/sqhpeh/chickadee/sspy/sonospy/gettags.py in main(argv=None)
 2932             for path in args:
 2933                 if path.endswith(os.sep): path = path[:-1]
 2934                 process_dir(path.decode(enc), options, database)
 2935     filelog.close_log_files()
 2936     return 0
global process_dir = <function process_dir>
path = 'PeterMusic.db'
path.decode = <built-in method decode of str object>
global enc = 'UTF-8'
options = <Values at 0xb61f08c8: {'verbose': False, 'datab...quiet': False, 'exclude': None, 'extract': None}>
database = '/home/sonos/sqhpeh/chickadee/sspy/sonospy/-v'

 /home/sonos/sqhpeh/chickadee/sspy/sonospy/gettags.py in process_dir(scanpath=u'PeterMusic.db', options=<Values at 0xb61f08c8: {'verbose': False, 'datab...quiet': False, 'exclude': None,$
  265     filelog.write_log(logstring)
  266
  267     c.execute('''insert into scans values (?,?)''', (None, scanpath))
  268     scannumber = c.lastrowid
  269     logstring = "Scannumber: %d" % scannumber
global c = <sqlite3.Cursor object>
c.execute = <built-in method execute of sqlite3.Cursor object>
builtinNone = None
scanpath = u'PeterMusic.db'
<class 'sqlite3.OperationalError'>: no such table: scans
    __class__ = <class 'sqlite3.OperationalError'>
    __delattr__ = <method-wrapper '__delattr__' of OperationalError object>
    __dict__ = {}
    __doc__ = None
    __format__ = <built-in method __format__ of OperationalError object>
    __getattribute__ = <method-wrapper '__getattribute__' of OperationalError object>
    __getitem__ = <method-wrapper '__getitem__' of OperationalError object>
    __getslice__ = <method-wrapper '__getslice__' of OperationalError object>
    __hash__ = <method-wrapper '__hash__' of OperationalError object>
    __init__ = <method-wrapper '__init__' of OperationalError object>
    __module__ = 'sqlite3'
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of OperationalError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of OperationalError object>
    __repr__ = <method-wrapper '__repr__' of OperationalError object>
    __setattr__ = <method-wrapper '__setattr__' of OperationalError object>
    __setstate__ = <built-in method __setstate__ of OperationalError object>
    __sizeof__ = <built-in method __sizeof__ of OperationalError object>
    __str__ = <method-wrapper '__str__' of OperationalError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __unicode__ = <built-in method __unicode__ of OperationalError object>
    __weakref__ = None
    args = ('no such table: scans',)
    message = 'no such table: scans'

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File "./gettags.py", line 2939, in <module>
    status = main()
  File "./gettags.py", line 2934, in main
    process_dir(path.decode(enc), options, database)
  File "./gettags.py", line 267, in process_dir
    c.execute('''insert into scans values (?,?)''', (None, scanpath))
OperationalError: no such table: scans

Mark Henkelis

unread,
May 2, 2020, 10:18:48 AM5/2/20
to sonosp...@googlegroups.com

Hi,

It looks like you have the options the wrong way round on the command line, -d should precede the database name, whereas you have it before -v so it thinks -v is the DB name.

Can you swap -v and -d and try again please, something like:

    ./scan -v -d PeterMusic.db /home/sonos/sqhpeh/musicTEST

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 view this discussion on the web, visit https://groups.google.com/d/msgid/sonospy-devel/8BCE8FDD-595F-468F-8C7B-8882BB1DAB5B%40gmail.com.

Peter Hood

unread,
May 11, 2020, 3:48:50 PM5/11/20
to Sonospy Development
Thanks for the help Mark got it working.  Now have to figure out indexing .  For information  it is working on version 11 build 56076060


Reply all
Reply to author
Forward
0 new messages