-
Notifications
You must be signed in to change notification settings - Fork 573
Fix the issues with non-ASCII characters in path on Windows #1613
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
base: v0.6
Are you sure you want to change the base?
Conversation
OK, thanks for hint. I've being able to reproduce it only in portable mode with many debug messages added. Can you please tell me how to get such detailed log in console? |
In the spec file set debug=True and console=True |
It looks like in my case there is an additional problem, I use a US locale in the OS but created a username with non-US characters. Python doesn't like it and I'm not sure how to fix that other than changing the user locale to something compatible, and relogin. After changing the locale it works even without this PR. Unless someone can report that this actually helped him I'm inclined to reject this PR. |
Hmm, I really cannot reproduce the issue with non-ASCII characters in username. What I see is the exception raised when you start PyBitmessage in portable mode from the directory containing non-ASCII characters: [7372] LOADER: Post-init sys.path is C:\Users\DEBD1~1.BOG\AppData\Local\Temp\_MEI113682
[7372] LOADER: Setting sys.argv
[7372] LOADER: setting sys._MEIPASS
[7372] LOADER: importing modules from CArchive
[7372] LOADER: extracted struct
[7372] LOADER: callfunction returned...
[7372] LOADER: extracted pyimod01_os_path
[7372] LOADER: callfunction returned...
[7372] LOADER: extracted pyimod02_archive
[7372] LOADER: callfunction returned...
[7372] LOADER: extracted pyimod03_importers
[7372] LOADER: callfunction returned...
[7372] LOADER: Installing PYZ archive with Python modules.
[7372] LOADER: PYZ archive: PYZ-00.pyz
[7372] LOADER: Running pyiboot01_bootstrap.py
[7372] LOADER: Running pyi_rth__tkinter.py
[7372] LOADER: Running pyi_rth_pkgres.py
[7372] LOADER: Running pyi_rth_qt4plugins.py
[7372] LOADER: Running pyi_rth_multiprocessing.py
[7372] LOADER: Running bitmessagemain.py
INFO: PyQt Version: 4.11.4
INFO: Qt Version: 4.8.7
Number of threads: 2
Exception in thread SQL:
Traceback (most recent call last):
File "threading.py", line 801, in __bootstrap_inner
File "class_sqlThread.py", line 31, in run
OperationalError: unable to open database file |
Can you tell me how to trigger it? |
Put executable into the directory with non-ASCII character in it's name. Run it. Go into Settings and set "User Interface -> Run in Portable mode". Restart PyBitmessage. |
73aca94
to
1e56f50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
from the file with unicode character in path. Closes: Bitmessage#165.
Hello!
This is the fix for the bug on Windows which was recently reported back in chan. When the
messages.dat
file path contains unicode characters the exceptionsqlite3.OperationalError: unable to open database file
is raised and PyBitmessage stops loading.I'm not sure about necessity of the change in
class_sqlThread
(os.path.join()
instead of strings concatenation). The main problem is in encoding of thestate.appdata
string. I used the solution from https://stackoverflow.com/questions/35833037.Related issues are: #165, #978