0

I set up a xampp-server using the highest rated answer of this thread: Running Python scripts with Xampp It is supposed to run Python-scripts. Starting a simple python file in the browser:

#!C:/Users/gfranosc/Downloads/Python/python.exe

from LambWaveModes import *


print("Content-Type: text/html\n")
print("Hi")
print('Beliebig viele Sachen')
LWM(Steifmat=[[[3.5,1.5,0],[1.5,3.5,0],[0,0,1]],[[103.08e9,2.8189e9,0],[2.8189e9,5.6469e9,0],[0,0,3.2727e9]]],rho=[1,1490],layer_thickness=[1,1],name="dataset_med",folder='dataset_1',color=0)

print('Hier bin ich nun')

The code runs fine, if i comment out the "from LambWaveModes import *" line. If i dont comment it out i get:

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at postmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.1 Server at localhost Port 80

How can i solve this problem?

14
  • LambWaveModes is a custom python module not available on PyPI. The error somewhere occurs when importing that python module. Sadly the server error displayed is very cryptic and doesn't help us further. Is it not possible to get a Python error traceback? Also if possible provide the source code for LambWaveModes. Does importing other python modules work fine? Commented Mar 3, 2020 at 11:02
  • you could run server in console to see all error messages. You could also check errors in log files created by Apache - you should see more details. You could check if server runs code in the same folder where you have file LambWaveModes.py - ie. print( os.getcwd() ) Commented Mar 3, 2020 at 11:04
  • @TinNguyen LambWaveModes is self written and runs fine while being called from a function, but not on the server. It is very long, how can I attach a file to this thread? Importing other modules works just fine. Commented Mar 4, 2020 at 8:44
  • @furas Only started it from the control panel before, so I got this error: "2020-03-04 9:45:55 18392 [ERROR] Can't find messagefile 'C:\xampp\mysql\share\errmsg.sys' 2020-03-04 9:45:55 18392 [ERROR] Aborting" So that's another little problem. I used os.getcwd() and it showed the folder where all the documents are. Commented Mar 4, 2020 at 8:51
  • this problem with errmsg.sys can gives 500 Internal Server Error on page - so it can be one and the same problem. Commented Mar 4, 2020 at 9:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.