Ah great, that is much better than having to modify sqlalchemy code. Indeed, the below code works for me:
os.chdir(os.path.dirname(db_path)) e = create_engine("sqlite:///", creator=lambda: sqlite3.connect(os.path.basename(db_path))) Thanks! Scott On Thu, Jun 19, 2014 at 2:09 PM, Mike Bayer <mike...@zzzcomputing.com> wrote: > > On 6/19/14, 3:37 PM, Scott Horowitz wrote: > > 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. > well if sqlite3.connect(os.path.abspath("relative/path")) is failing, > that's something for the Python core / SQLite folks regardless. > > if you need a workaround right now you can pass creator to the engine: > > e = create_engine("sqlite://", creator=lambda: sqlite3.connect("whatever")) > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "sqlalchemy" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sqlalchemy/Q6dAkM0y0Yo/unsubscribe. > To unsubscribe from this group and all its topics, 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. > -- 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.