Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Compatibility with old SQLite versions #694

Open
infinitescale opened this issue Apr 16, 2014 · 10 comments
Open

Compatibility with old SQLite versions #694

infinitescale opened this issue Apr 16, 2014 · 10 comments
Labels
bug bugs that are confirmed and actionable

Comments

@infinitescale
Copy link

Using: CentOS 6,Python 2.7

Config file:
directory: ~beet/music
library: ~beet/data/musiclibrary.blb
import:
move: no
copy: yes
write: yes

run: beet import

 File "/usr/local/lib/python2.7/site-packages/beets/dbcore/db.py", line 562, in mutate
    cursor = self.db._connection().execute(statement, subvals)
sqlite3.OperationalError: near "DEFAULT": syntax error
@sampsyo
Copy link
Member

sampsyo commented Apr 16, 2014

That's odd. Do you have a full traceback and the verbose output of the tool?

@infinitescale
Copy link
Author

CD 9
 * Notas Comunes (#1) (6:45)                         -> Blood Brothers (#90) (3:03) (title, length)
 * Soul Bossa Nova (#2)                              -> U-lu-la-lu (#91) (title)
 * Sex And The City (#3) (3:23)                      -> Sophie, the Bass (Sugar Sugar) (#92) (3:04) (title, length)
 * Cantaloupe Island (#4)                            -> In the Wings (#93) (title)
 * Beat It (Latin Tip) (#5)                          -> Jailbait (#94) (title)
 * Justo's Trane Ride (#6) (7:41)                    -> Skru op, (nu kommer drønet) (#95) (2:09) (title, length)
 * The Shadow of Your Smile (#42)                    -> Silky Sally (#96) (title, index)
 * Drume Negrita (#8) (7:12)                         -> WJ (#97) (1:15) (title, length)
 * Chupacabras (#9) (6:58)                           -> Lille Susanne - drømmer du (#98) (1:24) (title, length)
 * Samba De Sausalito (Album Version) (#10)          -> Snow Queen (#99) (title)
 * Meditation (#11) (5:11)                           -> Child of Institution (#100) (2:22) (length, title)
 * Looking for Love (#12) (3:49)                     -> Langebro (#101) (3:34) (title, length)
 * Blue Bossa (#13)                                  -> Lady Rain (#102) (title)
 * Autumn (#14) (7:02)                               -> Holy Jean (#103) (3:08) (title, length)
 * Ran Kan Kan (#15) (3:09)                          -> Dejlig er jorden (#104) (2:55) (title, length)
 * Come With Me (#16) (5:44)                         -> Campingvognen (#105) (2:18) (title, length)
 * Besame Mucho (#17) (3:20)                         -> Hva' gør vi nu, lille du? (#106) (3:34) (title, length)
 * Rumba Intro (#11)                                 -> Som et strejf af en dråbe (#107) (title, index)
 * Un Violin Pa Chano (#2) (9:53)                    -> Boogie Jam (#108) (9:39) (title, index, length)
Apply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? U
Traceback (most recent call last):
  File "/usr/local/bin/beet", line 9, in <module>
    load_entry_point('beets==1.3.5', 'console_scripts', 'beet')()
  File "/usr/local/lib/python2.7/site-packages/beets/ui/__init__.py", line 967, in main
    _raw_main(args)
  File "/usr/local/lib/python2.7/site-packages/beets/ui/__init__.py", line 958, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/local/lib/python2.7/site-packages/beets/ui/commands.py", line 816, in import_func
    import_files(lib, paths, query)
  File "/usr/local/lib/python2.7/site-packages/beets/ui/commands.py", line 788, in import_files
    session.run()
  File "/usr/local/lib/python2.7/site-packages/beets/importer.py", line 363, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 254, in run
    out = self.coro.send(msg)
  File "/usr/local/lib/python2.7/site-packages/beets/importer.py", line 946, in apply_choices
    album = session.lib.add_album(items)
  File "/usr/local/lib/python2.7/site-packages/beets/library.py", line 999, in add_album
    album.add(self)
  File "/usr/local/lib/python2.7/site-packages/beets/library.py", line 175, in add
    super(LibModel, self).add(lib)
  File "/usr/local/lib/python2.7/site-packages/beets/dbcore/db.py", line 336, in add
    'INSERT INTO {0} DEFAULT VALUES'.format(self._table)
  File "/usr/local/lib/python2.7/site-packages/beets/dbcore/db.py", line 562, in mutate
    cursor = self.db._connection().execute(statement, subvals)
sqlite3.OperationalError: near "DEFAULT": syntax error

Run as user root - not sure if that makes a difference?

Thanks,
Dev

@sampsyo
Copy link
Member

sampsyo commented Apr 18, 2014

Very odd. My best guess is a very old version of SQLite that doesn't support the DEFAULT VALUES syntax. What does this command output?

$ python -c 'import sqlite3 ; print sqlite3.sqlite_version'

@infinitescale
Copy link
Author

python -c 'import sqlite3 ; print sqlite3.sqlite_version'
Traceback (most recent call last):
File "", line 1, in ?
ImportError: No module named sqlite3

@sampsyo
Copy link
Member

sampsyo commented Apr 18, 2014

Oh no. It looks like beets is running against some Python other than what's invoked by python on your machine. Do you know what that is? Perhaps python2.7?

@infinitescale
Copy link
Author

Sorry
python2.7 -c 'import sqlite3 ; print sqlite3.sqlite_version'
3.3.6

@infinitescale
Copy link
Author

Setting up Install Process
Package sqlite-devel-3.3.6-7.x86_64 already installed and latest version
Package sqlite-devel-3.3.6-7.i386 already installed and latest version
Nothing to do

@infinitescale
Copy link
Author

Could there be issues importing LatAm Songs? They have accented characters...

@sampsyo
Copy link
Member

sampsyo commented Apr 18, 2014

Ah yes, it looks like CentOS is still using a version of SQLite from 2006: https://sqlite.org/changes.html

I can't find a changelog entry mentioning this syntax, but I'd be willing to bet this is a version issue. We can try to find a way to work around the old version. In the mean time, maybe there's a way to upgrade your SQLite?

And no, this does not have to do with accented characters. Those are fine.

@sampsyo sampsyo added bug and removed needinfo labels Apr 18, 2014
@sampsyo sampsyo changed the title Error running beet import Compatibility with old SQLite versions Apr 18, 2014
@PothuluruMahesh
Copy link

PothuluruMahesh commented Dec 2, 2018

how we can install two versions of sqlite3 at a time. it means i need to install sqlite3-version 2.0 and also sqlite3-version 3.0.
it is possible to install two various version of sqlite3 by using only one command in npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable
Projects
None yet
Development

No branches or pull requests

3 participants