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

sandmanctl doesn't list any endpoints on Python3.4/Sqlite #107

Open
ChrisAichinger opened this issue Jun 12, 2015 · 2 comments
Open

sandmanctl doesn't list any endpoints on Python3.4/Sqlite #107

ChrisAichinger opened this issue Jun 12, 2015 · 2 comments

Comments

@ChrisAichinger
Copy link

I installed sandman from the current git (because of #106) in a venv based on Python3.4 on an i386 Debian Jessie system. When starting sandmanctl with the chinook database (sqlite version 3.8.7.1-1+deb8u1), no endpoints show up (same with a custom database and with custom sandman code):

(venv) $ sqlite3 Chinook_Sqlite.sqlite
SQLite version 3.8.7.1 2014-10-29 13:59:56
Enter ".help" for usage hints.
sqlite> .tables
Album          Employee       InvoiceLine    PlaylistTrack
Artist         Genre          MediaType      Track
Customer       Invoice        Playlist
sqlite>
(venv) $ sandmanctl --port 4999 sqlite:///Chinook_Sqlite.sqlite
venv/lib/python3.4/site-packages/click/core.py:822: Warning: Invoked legacy parameter callback "<function print_version at 0xb660f854>".  The new signature for such callbacks starting with click 2.0 is (ctx, param, value).
  value, args = param.handle_parse_result(ctx, opts, args)
 * Running on http://0.0.0.0:4999/ (Press CTRL+C to quit)
 * Restarting with stat
venv/lib/python3.4/site-packages/click/core.py:822: Warning: Invoked legacy parameter callback "<function print_version at 0xb65f6854>".  The new signature for such callbacks starting with click 2.0 is (ctx, param, value).
  value, args = param.handle_parse_result(ctx, opts, args)
127.0.0.1 - - [12/Jun/2015 15:17:47] "GET / HTTP/1.1" 304 -
127.0.0.1 - - [12/Jun/2015 15:17:54] "GET /Album HTTP/1.1" 404 -
127.0.0.1 - - [12/Jun/2015 15:17:54] "GET /static/css/bootstrap.min.css HTTP/1.1" 415 -
@ChrisAichinger
Copy link
Author

Just checked it with Python 2.7 as well, it doesn't work there, either. Same result: "Available Endpoints" and an empty page below it.

@ChrisAichinger
Copy link
Author

The problem is that sqlite relative path URLs don't work, while absolute paths do:

# Fails
sandmanctl --port 4999 sqlite:///Chinook_Sqlite.sqlite

# Works
sandmanctl --port 4999 sqlite:////abs/path/to/Chinook_Sqlite.sqlite

# The database is in the local directory, where it should be:
ls Chinook_Sqlite.sqlite
Chinook_Sqlite.sqlite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant