Hi,

That's unfortunate problem. The API requires byte streams, while 
os.path.exists requires unicode. The obvious solution is to 
encode/decode at either place, but the key problem is which encoding we 
should use? Any ideas?

best regards
Pavel Cisar
IBPhoenix

Dne 9.7.2014 11:31, Werner werner...@gmx.ch [firebird-python] napsal(a):
> Hi,
>
> I am starting to test the move to Python 3 of my stuff and at the same
> time switch to fdb.
>
> I am running into this when doing a backup.
>
> File "D:\devMine\license-new\twcblicsrc\views\license.py", line 171, in
> <module>
>     app = ab.BaseApp(redirect=False)
> File "c:\Python34\Lib\site-packages\wx\core.py", line 1850, in __init__
>     self._BootstrapApp()
> File "d:\devMine\license-new\twcblicsrc\app_base.py", line 170, in OnInit
>     self.updateDB()
> File "d:\devMine\license-new\twcblicsrc\app_base.py", line 500, in updateDB
>     if not dbupg.dbUpgrade(prefMinimal):
> File "d:\devMine\license-new\twcblicsrc\dbupdatetools\dbupgrade.py",
> line 40, in dbUpgrade
>     if not apputils.doDbBackup():
> File "d:\devMine\license-new\twcblicsrc\apputils.py", line 223, in
> doDbBackup
>     con.backup(wx.GetApp().dbfilename, backupName)
> File "c:\Python34\Lib\site-packages\fdb\services.py", line 930, in backup
>     request.add_database_name(source_database)
> File "c:\Python34\Lib\site-packages\fdb\services.py", line 1826, in
> add_database_name
>     not os.path.exists(databaseName)
> File "c:\Python34\Lib\genericpath.py", line 19, in exists
>     os.stat(path)
>
> builtins.DeprecationWarning: The Windows bytes API has been deprecated,
> use Unicode filenames instead
>
> I believe the problem is with line 870 in services.py:
>
> source_database = ibase.b(source_database)
>
> Werner
>
>
> ------------------------------------
> Posted by: Werner <werner...@gmx.ch>
> ------------------------------------
>
>
> ------------------------------------
>
> Yahoo Groups Links
>
>
>
>

Reply via email to