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

Installation Error #217

Open
qrenz opened this issue Apr 13, 2021 · 2 comments
Open

Installation Error #217

qrenz opened this issue Apr 13, 2021 · 2 comments

Comments

@qrenz
Copy link

qrenz commented Apr 13, 2021

Hello,

I'm using a fresh install of Python 3.9 and trying to install using pip on windows and keep getting these errors. This happens when I run "supysonic-cli user add MyUserName"

also happens on linux

Traceback (most recent call last):
  File "c:\python39\lib\site-packages\pony\orm\dbapiprovider.py", line 55, in wrap_dbapi_exceptions
    try: return func(provider, *args, **kwargs)
  File "c:\python39\lib\site-packages\pony\orm\dbapiprovider.py", line 230, in connect
    return provider.pool.connect()
  File "c:\python39\lib\site-packages\pony\orm\dbapiprovider.py", line 351, in connect
    pool._connect()
  File "c:\python39\lib\site-packages\pony\orm\dbproviders\sqlite.py", line 660, in _connect
    pool.con = con = sqlite.connect(filename, isolation_level=None, **pool.kwargs)
sqlite3.OperationalError: unable to open database file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python39\Scripts\supysonic-cli-script.py", line 33, in <module>
    sys.exit(load_entry_point('supysonic==0.6.3', 'console_scripts', 'supysonic-cli')())
  File "c:\python39\lib\site-packages\supysonic\cli.py", line 446, in main
    init_database(config.BASE["database_uri"])
  File "c:\python39\lib\site-packages\supysonic\db.py", line 660, in init_database
    metadb.bind(**settings)
  File "c:\python39\lib\site-packages\pony\orm\core.py", line 774, in bind
    self._bind(*args, **kwargs)
  File "c:\python39\lib\site-packages\pony\orm\core.py", line 796, in _bind
    self.provider = provider_cls(*args, **kwargs)
  File "c:\python39\lib\site-packages\pony\orm\dbproviders\sqlite.py", line 344, in __init__
    DBAPIProvider.__init__(provider, *args, **kwargs)
  File "c:\python39\lib\site-packages\pony\orm\dbapiprovider.py", line 130, in __init__
    connection, is_new_connection = provider.connect()
  File "<string>", line 2, in connect
  File "c:\python39\lib\site-packages\pony\orm\dbapiprovider.py", line 72, in wrap_dbapi_exceptions
    raise OperationalError(e)
pony.orm.dbapiprovider.OperationalError: unable to open database file
@vincentDcmps
Copy link
Contributor

Hello
How do you configure your database path
Because by default she is set to:
; Default: sqlite:////tmp/supysonic/supysonic.db
And this path does't exist on windows
I m not sure supysonic have been test to work on windows system

@spl0k
Copy link
Owner

spl0k commented Apr 14, 2021

Hello @qrenz

Did you set the database path properly? This is described in the documentation. Since you're using SQLite make sure it is pointing to an accessible writable path. Absolute path are recommended, you have some examples in the link above.

The default value mentioned as a comment in the sample (and by @vincentDcmps) is a bit misleading as it should pick a valid temporary path for the platform you're running on. So even if you didn't set anything it should work, but it's best to configure it to a known location.
As you're running on Windows, the configuration file should be located at C:\Users\YOUR USERNAME HERE\.supysonic (note the leading dot) or supysonic.conf in the directory you're running the commands from.

Again Supysonic hasn't be thoroughly tested on Windows, but I don't see any reason why it shouldn't work. Windows is actually the platform I use for development, even though I'm more used to deploy Supysonic on Linux environments. If you encounter any problem (besides this one) don't hesitate to open a new issue.

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

3 participants