-
Notifications
You must be signed in to change notification settings - Fork 112
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
Warn/work around Java issues with tr_TR locale #436
Comments
Thanks for opening this issue! The bug report template asks you to provide the output of |
ixmp.show_versions()
|
Can you try both of the following and report the results?
|
mp.add_unit("foo")
|
I suspect the notebook error is a consequence of the database being locked; that, in turn, is the result of some code you ran earlier exiting prematurely. Assuming you are only running the tutorials so far and do not have any other data, you can delete the files for the locked database ( |
I deleted the files and ran
It could be due to character encoding as there is usually mixing between english character "i" and turkish character "ı" which is also apparent in command output as unit is spelled as "unıt" at the last sentence. I changed my locale to English and encoding to UTF-8 but did not result in any difference.
|
Thanks for checking, and good eye. I was also going to guess about the encoding of strings, but more related to your This is at least related (if not directly caused by) an old long-known bug in some Java code underlying the JDBCBackend (iiasa/ixmp_source#288, unfortunately not in a public repo). That bug report is just a link to https://garygregory.wordpress.com/2015/11/03/java-lowercase-conversion-turkey/. What happens is there is a database table named "UNIT", and to format the string, Java's String.toLowerCase() is called, which uses the current locale and produces "unıt". It's possible this is happening elsewhere in the code. Can you please try the following—if possible with your system locale in each of tr_TR (as in the original report) and en_US (the second attempt)? import ixmp
mp = ixmp.Platform(name="default", jvmargs="-Duser.language=en")
mp.add_unit("foo") |
This solves the issue for both tr_TR and en_US system locale. Thank you for your help. |
Great, glad to hear it. I would still consider that an "unadvertised workaround," so we need to do at least 1 thing and maybe 2:
So I reopen the issue to track those actions, but nothing further needed from you! Thanks again for the report. |
I installed message-ix and ixmp 3.4.0 with anaconda and have Java exception with the code below in Westeros tutorial.
I checked the units in the ixmp instance and see that the unit is not already defined.
I think there is a problem with my connection to the ixmp backend and would appreciate your help.
The text was updated successfully, but these errors were encountered: