I run several python scripts as Windows Services on Windows XP. Just now they all died. They will not restart. I have no clue what is going on. I can't seem to get an error message to give me more insight. I haven't tried to reinstall any modules yet. What Modules are used by Windows Services in python?
EDIT:
When I reinstall pywin32 I do get this error:
However after clicking the 'ok' button, module does continue to install
Found the Issue. Windows Error Log was full... So the script could not even send a message to log saying that service restarted thus it would fail and not log any error messages to boot.
Related
I'm currently attempting to make a Jira plugin that contains a Java servlet that calls my Python script with ProcessBuilder to do some frontend work, which works perfectly on localhost.
Except, whenever I deploy it onto the online Jira server, my python script doesn't get called and hence the HTML isn't updated. I've deduced that it is most likely because the plugin or machine running the Jira server responsible for calling my script probably doesn't have anything in it to execute python.
As a result, I've tried to do some process builder things and install Python onto the server, to no avail. I found out that the system running the server is a Linux machine and have tried to "sudo apt-get install python" and even tried to just run python3 myscript.py to no avail. It keeps erroring out and throwing me a NullPointerException whenever I start any process that has to do with installing Python.
Anyone have any ideas?
I am currently struggling to get pyautogui to work with my vps.
The script runs fine locally, but when I attempt to launch the command on another computer outside of the network, I am getting the "screen grab failed" error.
I think this may be due to some permission issues, but not sure.
Thanks for the help.
I am running an ongoing command on a Windows Anaconda Powershell terminal to scrape Twitter data. I would like to be able to receive a notification if the code drops, preferably either email or SMS message. I've been able to find some packages that do this in OS but not Windows. Any ideas on how this could be set up?
you can create a python script which call your code inside it and get notified using knockknock.
I'm actually learning to use the Django framework with PostgreSQL with Docker and docker-compose.
Regularly, when I make a mistake (for example a syntax error in the views.py file), I cannot reach my Django app anymore trough my web browser.
Firefox tells me:
Unable to connect
Firefox can't establish a connection to the server at localhost:8000
Chrome tells me:
This site can’t be reached
localhost refused to connect.
ERR_CONNECTION_REFUSED
I had this several times and I always managed to find the error in my code, to correct it and then everything went well again.
Currently, my code is working fine. But if I encounter this again (and this happens very often), I would like to be able to find the error quickly by myself.
So here is my question:
How can I see which file at which line contains the error ?
I would like to have a correct error message telling me what went wrong instead of that annoying ERR_CONNECTION_REFUSED browser page over and over.
I hope I explained my issue well because I struggled to describe it to Google.
Thanks a lot in advance. :)
FYI:
Ubuntu 18.04.3 LTS Bionic (window manager i3wm)
Docker 19.03.4
docker-compose 1.17.1
python 3.7 (docker image)
Django 2.2.6 (inside the python 3.7 image)
PostgreSQL 12.0 (docker image)
Visual Studio Code 1.39.2
I finally found a solution.
I had the bad habit to run my docker-compose in detached mode.
When attached, the syntax errors are shown directly from the terminal when de container is stopped.
I also added a script where I run my server in a loop. This way, the server will relaunch automatically over and over until I correct the error. I don't have to restart my Django server manually.
Thank you for helping me anyway.
System:
Windows 10 x64 (enterprise computer with some restrictions)
Apache 2.4 64-bit
Python 3.7.1 64-bit
mod_wsgi (built today from github using python setup.py install)
I am working on getting an Apache server with Python on a Windows machine and I have the server configured correctly in order to get the Hello World! example from mod_wsig documentation working.
If I simply launch C:\Apache24\bin\httpd.exe, this works and I see Hello World at http://localhost:5000/
Then I wanted to get it running as a service, so I call
httpd.exe -k install
In the ApacheMonitor I start the new Apache2.4 service but I get a failed to start error. In the Windows system event log it says Event ID: 7024 with a service specific error: Incorrect function.
When I run httpd.exe -k start -n "Apache2.4" -t it says Syntax OK
What I can't find is any more information about the service error. Nothing populates in the error.log file and I don't know where else to look, and I am asking for any further information on how to diagnose this.
Before I started configuring Apache to use mod_wsgi, launching the service was successful, so this happened after doing that, and I haven't configured anything else at this point.
Go to the Command Prompt move to the apache/bin folder and type
>httpd -t
This will give you more information about the error preventing Apache from start.
I was getting this error after updating my httpd.conf file. The problem was that my final xml tag in httpd.conf was unclosed </directory without the closing >.
This days I was facing the same situation, windows 10, apache24, django app, python3.8, failing to start as service, service events showing error 7024...
So, after a lot of struggling and research, I would like to add my solution even this is an old question.
The solution was to add two environment variables, no in httpd.conf, not in python code/conf but at SO level (windows > environment variables)
PYTHONHOME = c:\your\path\to\installed\python
PYTHONPATH = c:\your\path\to\installed\virtualenv
And magic! apache now works as service and the django app is always available on localhost