-
Notifications
You must be signed in to change notification settings - Fork 750
Exception in flask and mod_wsgi app #180
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
Comments
It does indeed seem that adding a call to
|
See #181. Travis build failing because it's using an ancient Mono 3.2.8 which does not even have the |
@danic see this doc how to update mono on travis ci: |
@denfromufa saw that thanks. Did try a couple of things on my fork by specifying mono versions but it doesn't work because Travis is using ancient Precise VMs. I did try the new Trusty image but the build hung out and failed. It's kind of irrelevant though as I know my fix works on both distros in fact as I have both a Precise box and a Trusty AWS instance both with Mono 4.2.2. So I'll leave it at that for the time being. |
@danic maybe it is possible to download latest mono binaries (4.2.2) instead of compiling on build machine? it probably time outs before it builds due to constrained resources. |
After a few disagreements with Travis I finally managed to persuade it to build it. It works now. |
I've re-opened this as the PR was against the wrong branch. Please submit a new PR against the develop branch. |
Update travis CI build to use latest mono and add a call to mono_domain_set_config to solve problems using pythonnet with mod_wsgi.
Update travis CI build to use latest mono and add a call to mono_domain_set_config to solve problems using pythonnet with mod_wsgi.
Done - see PR #189 |
Has anybody managed to successfully run a (non-trivial) Flask app under Apache mod_wsgi using pythonnet ? My app keeps throwing this exception:
"System.TypeInitializationException: The type initializer for 'System.Web.Script.Serialization.JavaScriptSerializer' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.ArgumentException: The 'ExeConfigFilename' argument cannot be null"
as soon as it tries to use a clr object that deserializes some JSON. Full details here:
http://stackoverflow.com/questions/35872504/pythonnet-exception-the-execonfigfilename-argument-cannot-be-null
On this bug Mono added the
mono_domain_set_config
API to help with this situation. I don't see that method being called in the Mono code. Neither it seems to be called if I run the code in this other bug through gdb. However the code does not crash, as on the other hand I would expect as my version of Mono does have that bugfix. Still don't quite understand how that bug fix works though if it's not being called. Obviously missing something fairly fundamental here.Maybe pythonnet
PyNet_Init
needs to explicitly callmono_domain_set_config
?The text was updated successfully, but these errors were encountered: