Michael,

Thanks for the hint about python's sqlite3. 

I'll just point out that I can work around the issue directly with sqlite3 
by providing a relative path that does not include the character:

import sqlite3, os
os.chdir("/path/with/non/ascii/character")
conn = sqlite3.connect("file.db")

However if I take this same approach with sqlalchemy, it does not fix the 
issue. It appears that this is because sqlalchemy always provides the 
absolute path to sqlite3. 

If I comment out these lines in sqlalchemy/dialects/sqlite/pysqlite.py's 
create_connect_args() method, then the above workaround works:

if filename != ':memory:':
    filename = os.path.abspath(filename)

I am going to file a bug report to see if this should/could be changed (I'm 
not sure if there are any downsides to removing these lines).

Scott

On Thursday, June 19, 2014 12:48:57 PM UTC-6, Michael Bayer wrote:
>
>  no but this is more of a pysqlite/sqlite3 issue, you should ask on the 
> Python users list, and refer to the sqlite3.connect() function:
>
> import sqlite3
> conn = sqlite3.connect("/path/to/file.db")
>
>
> On 6/19/14, 2:28 PM, Scott Horowitz wrote:
>  
> Hi,
>
> A user of my applicable is getting a "unable to open database file None 
> None" error because the file path to their database has a "Á" character in 
> it. It works fine if the character is removed, but that is not a good 
> solution.
>
> Does anyone know how to solve this? 
>
> Thanks,
> Scott
>  -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy+...@googlegroups.com <javascript:>.
> To post to this group, send email to sqlal...@googlegroups.com 
> <javascript:>.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.
>
>
> 

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

Reply via email to