UnicodeEncodeError: 'ascii' codec can't encode character '\xe5' in position 27: ordinal not in range(128)
Categories
(Testing :: mozregression, defect, P3)
Tracking
(Not tracked)
People
(Reporter: s.mikael.hkansson, Assigned: zeid)
References
Details
Attachments
(1 file)
Steps to reproduce:
- Install mozregression-gui-signed.exe
- Run program
Actual results:
Crash Dialog
platform: Windows-10-10.0.22631-SP0
python: 3.10.11 FROZEN (64bit)
mozregression: 6.0.2
message: UnicodeEncodeError: 'ascii' codec can't encode character '\xe5' in position 27: ordinal not in range(128)
traceback: File "mozregression-gui.py", line 6, in <module>
File "mozregui\main.py", line 35, in main
File "mozregui\global_prefs.py", line 66, in set_default_prefs
File "mozregui\global_prefs.py", line 57, in save_prefs
File "configobj_init_.py", line 2117, in write
Expected results:
No crash.
Comment 1•1 year ago
|
||
The severity field is not set for this bug.
:zeid, could you have a look please?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 2•1 year ago
|
||
I believe this is most likely due to your home directory path containing a unicode character (possibly å), and most likely the default "persist" directory is based on that directory and is stored in the conf file. One possible workaround is to manually set the persist directory to something else in that file (it should be in ~/.mozilla/mozregression/mozregression.cfg and is the persist value).
| Assignee | ||
Comment 3•1 year ago
|
||
Mikael -- can you try the workaround to see if it helps? If the file does not exist, you can create it and add a specific path to the persist value, e.g.
persist = C:\tmp\mozregression_persist
| Reporter | ||
Comment 4•1 year ago
|
||
Yes, there's an å in the account name, and the workaround works.
Now I can get back to bug hunting, thanks.
| Reporter | ||
Comment 5•1 year ago
|
||
After the workaround it's possible to change the persist back into the account folder with the å without problems.
| Assignee | ||
Comment 6•1 year ago
|
||
(In reply to Mikael Håkansson from comment #5)
After the workaround it's possible to change the persist back into the account folder with the å without problems.
Thanks for that bit of additional info.
It might pop back up when something else has to be changed or rewritten in the config file, I think there is a fix for this by changing the way that the ConfigObj object is instantiated. Will look into it later for a more permanent fix.
| Assignee | ||
Comment 7•1 year ago
|
||
Comment 9•1 year ago
|
||
I tested 6.2.2 with the comment 7 changeset applied, but this problem still reproduced on Win11 x86_64.
| Assignee | ||
Comment 10•1 year ago
|
||
Takanori -- I am curious if deleting the "persist" line in the config file (see comment 2) and retrying helps with this?
Comment 11•1 year ago
•
|
||
I am using the home directory of "C:\Users\(My Name which have four Japanese kanji characters and no ascii characters)" such as C:\Users\火狐火狐.
Steps to reproduce 1:
- Remove the ~/.mozilla/mozregression directory
- Uninstall mozregression using the uninstaller
- Reinstall mozregression
- Run mozregression
Actual result 1:
mozregression does not start with the above error message.
Steps to reproduce 2:
- Add a persist line to the file ~/.mozilla/mozregression/mozregression.cfg that contains the directory name including UTF-8.
- Run mozregression
Actual result 2:
mozregression starts properly.
Steps to reproduce 3:
- Add a persist line to the file ~/.mozilla/mozregression/mozregression.cfg that contains the directory name including UTF-8.
- Run mozregression
- "File -> Preferences"
- Click "OK"
Actual result 3:
mozregression failed to write config with the above error message.
So I suppose we should fix not write_config in config.py but save_prefs in global_prefs.py.
Description
•