Error opening options dialog

If you have a question or need help, this is the place to be.
someguy1
Posts: 34
Joined: Sun Mar 02, 2014 2:09 pm

Re: Error opening options dialog

Post by someguy1 » Sun Feb 24, 2019 12:08 pm

Yes with the version I downloaded from the Build link and changing setlocale to none both problems got fixed for me. Thank you.

User avatar
kgschlosser
Site Admin
Posts: 5027
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error opening options dialog

Post by kgschlosser » Sun Feb 24, 2019 12:10 pm

OK so now I know what the solution is


Thank You! made it really easy. Friggin Microsoft.
If you like the work I have been doing then feel free to Image

someguy1
Posts: 34
Joined: Sun Mar 02, 2014 2:09 pm

Re: Error opening options dialog

Post by someguy1 » Sun Feb 24, 2019 12:28 pm

Ya this is because of windows. When I for example just want English (sweden) as region format, and then install a custom keyboard layout instead of the default one then apps like microsoft word can only be typed with Times new roman, and other strange behavior. Win10 is a nightmare.

User avatar
kgschlosser
Site Admin
Posts: 5027
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error opening options dialog

Post by kgschlosser » Sun Feb 24, 2019 7:51 pm

they change things possibly to fix something but they break something else in the process.

Now this is not going to always work. that was a simple line swap to solve the issue at hand..
what you need to do to make sure you do not have any issues in the future is this.

that same line ni Cli.py.. you want to change it to the code below

Code: Select all

try:
    locale.setlocale(locale.LC_ALL, '')
except locale.Error:
    locale.setlocale(locale.LC_ALL, None)
    
the above code will try the old way first. and if that fails then it will move on to trying the new way. We want to set it up this way so on the off chance that Microsoft reverses what they did. or if they find a solution it is not going to break again.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5027
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error opening options dialog

Post by kgschlosser » Sun Feb 24, 2019 7:55 pm

I am going to ask you a question. and lets see if you can answer it..

Microsoft has made an unknown sum of money from selling Windows. (lets assume over a trillion US dollars)... Why would a company that has made that kind of revenue from a product all of a sudden decide to give it away for free?? Do you think it is out of the kindness?? what is the motivation? You know the answer to this. Then ask yourself why you have it installed on your computer?
If you like the work I have been doing then feel free to Image

someguy1
Posts: 34
Joined: Sun Mar 02, 2014 2:09 pm

Re: Error opening options dialog

Post by someguy1 » Mon Feb 25, 2019 8:32 am

Thanks again or the new code edit.

Yeah I totally agree with you on Microsoft and Windows 10. Sadly I had but no choice to upgrade to Windows 10. After holding it off for 3.5 years and being happy with my Windows 7 my PC died. So I had to buy a new one, surprisingly there are no drivers for Windows 7 on any new hardware. Thus I ended up installing this bloody spyware beta OS called Windows 10.

User avatar
kgschlosser
Site Admin
Posts: 5027
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error opening options dialog

Post by kgschlosser » Mon Feb 25, 2019 8:44 am

Tip:

Windows 7, 8, 8.1, 10 The drivers are all the same. the only thing that can differ is if the driver is signed for the specific version of windows you are using. You may have to coax it a little to get it to install, what I mean by this is if thee driver is packaged into a setup program. and the setup program is what is complaining about the OS version. you will need to open the setup.exe file using 7-Zip or WinRar in some cases. and locate the inf files.. and where those files are located so are all of the rest of the files needed. You will have to go old school and open device manager and click on upgrade driver and point to where the driver is. select the thing.. so on and so forth.... Actually this is the only way i install any driver. I never use the packaged installer. I do not want all the additional "fluff" slowing down my system. A lot of times I will locate the actual chip manufacturer and not the component manufacturer and use their drivers instead.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5027
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error opening options dialog

Post by kgschlosser » Mon Feb 25, 2019 8:49 am

and if you state UEFI. I am going to tell you that the first Microsoft OS to support UEFI was in fact NOT Windows 8, Windows 7 was the first. Most people do not know that. and they also do not know the process in which to install it. The funny thing is that Windows 7 was mad to run UEFI not because the "PC" at the time supported it. because they didn't. It was made to support UEFI so crapintosh users could install Windows onto their machines.
If you like the work I have been doing then feel free to Image

someguy1
Posts: 34
Joined: Sun Mar 02, 2014 2:09 pm

Re: Error opening options dialog

Post by someguy1 » Mon Feb 25, 2019 1:12 pm

Wow thanks for the info man, I will give win7 another try then.
Ya I never understood what that Uefi stuff was about.
Again thanks! :D

User avatar
kgschlosser
Site Admin
Posts: 5027
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error opening options dialog

Post by kgschlosser » Mon Feb 25, 2019 5:16 pm

all UEFI is is having the "cor" of the OS stored in NV ram essentially. the drivers get stored there as well. this is a chunk of memory that cannot be altered by a program (well in theory) and because of that the OS is technically speaking "protected" from things like viruses. a side effect i guess would be much faster boot ups. the downfall unless you get a modified bios firmware installed is you cannot install a bootleg OS unless you have an SLiC added to the bios firmware. the SLiC is the product key for the OS. once your bios has one (usually OEM PC's have them) Any time you reinstall the same version of the OS you are good to go. you never need to activate it.
If you like the work I have been doing then feel free to Image

someguy1
Posts: 34
Joined: Sun Mar 02, 2014 2:09 pm

Re: Error opening options dialog

Post by someguy1 » Tue Feb 26, 2019 1:40 am

Oh, thanks man for the info.

User avatar
kgschlosser
Site Admin
Posts: 5027
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error opening options dialog

Post by kgschlosser » Tue Mar 12, 2019 11:32 pm

II wanted to do a follow up on the setlocale problem.

This is what is taking place. Microsoft did not change the setlocal portion of Windows. What they have done iis they added a large amount of languages/locales to Windows. this has opened up a lot of options for the user to say set their locale to Germany but their language to English. I am specifically using this as an example because it happens with that specific setup. most languages/locales in Windows have an LCID. which is a unique identifier for that language/local. the LCID is hard coded into Windows and never changes. Windows has had for a long time dynamic LCID's which is basically a language/locale that does not have a hard coded LCID. up until this last release of Windows there was maybe a handful of language/locals that used this dynamic setup. and they were also very obscure languages and locales. So no one ever happened across the problem. by passing an empty string to setlocale this causes Windows to set up the process using the user set language/locale. This process relies on the LCID. and the LCID for a dynamic language/locale is 0x1000 and all dynamic languages/locales have tht exact same LCID. So Windows pitches a fit.

Passing None to setlocale is a band-aide because it sets the process's locale to thee C type settings. Tho it does work It could cause issues as well.

I have written a dedicated section of code to handle the language/locale. What I have discovered is that if I pass a string formatted like so

english country name_english language name.codepage

to set locale it will now properly set the processes locale. The way the current design is it sets the locale to what Windows is set to. Now what if someone wants to have language/locale settings that do not match Windows. EG has the ability to change the language. but not the locale. In the new code it now offers the user to set both the language and the locale separately from Windows.

Here are some metrics for ya.

new setup supports every language/locale that Windows supports from XP to 10 including all of the language packs

which is
total of 254 countries
total of 270 languages.

a "locale" is a country language combination.

total of 610 locales

Not all locals are supported by the various versions of Windows.
Windows 7 SP2 without any language packs.

supports a total of 123 countries
supports a total of 123 languages
which makes up a total of 196 locales.

The new language/locale handling now supports very single one of the 610 possible locales. currently EG only has support for 11 locales. because of how the system was designed. I did not add any additional language files so there are still only the 11 translations. with my changes EG will be able to support 58 locales. The reason this happened is because a language may not only bee spoken in a single country Spanish for instance is spoken in 11 different countries. and each of those countries coupled with the language of Spanish makes up a unique locale.

I also have the options dialog display the language name and the country name in the native script. So if a user looks for Spanish as a language name they will not find it. they will however find Espanol (Spanish in Spanish). after selecting that language they will be given the different available Countries that the language is spoken in. so if thy go to look for United States they will not find it, Estados Unidos will be in there instead (Spanish for United States).

Frankly I am tired of having locale problems with EG I may ask if anyone wants to run an Alpha test build to make sure that it all runs properly.

I did want to mention that was an update to EG of 7688 lines of code.
If you like the work I have been doing then feel free to Image

User avatar
zian
Site Admin
Posts: 566
Joined: Wed Jun 24, 2009 3:54 pm

Re: Error opening options dialog

Post by zian » Thu Mar 21, 2019 3:02 pm

kgschlosser wrote:
Sun Feb 24, 2019 5:11 am
Yes we know of the problem it has been fixed. If you click on the build button at the top of the forum you can download a version of EG that has the fix added to it.
kgschlosser wrote:
Sun Feb 24, 2019 5:15 am
That locale error we also know about. And that is because you are running build 1809 of Windows. Microsoft broke something in that build. I am currently trying to work around the problem . No solution as of yet.

If you go into Cli.py file and change

locale.setlocale(locale.LC_ALL, '')

To
locale.setlocale(locale.LC_ALL, None)

See if that fixes it.
Thank You x2
eventghost.net
Be there or be square.

User avatar
kgschlosser
Site Admin
Posts: 5027
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error opening options dialog

Post by kgschlosser » Fri Mar 22, 2019 6:10 am

no worries m8
If you like the work I have been doing then feel free to Image

DavidY
Posts: 8
Joined: Fri Aug 21, 2009 7:27 am

Re: Error opening options dialog

Post by DavidY » Sun Jul 28, 2019 12:57 am

From the Github thread "Exepction when trying to open the options dialog on system with en_US locale, 0.5.0-rc6 #351", posted by thecode:

"As a workaround I have changed line 84 in OptionsDialog.py from:
languageList = ["en_EN"]
to:
languageList = ["en_US"]
Options dialog opened successfully without any errors."

Which worked for me.

Post Reply