36

I'm running a python script and it used to work (it even does on my other laptop right now) but not on my current computer - I just get the error code:

Process finished with exit code -1073741515 (0xC0000135)

I don't get any other results - not even from "print" commands at the beginning of the file.

I haven't found anything specific to that. I re-installed python (2.7.9), pygame (1.9.1) and even pycharm (tried 4.5 first, now with 5.0 - same result)

Does anyone know what that error code means? I couldn't find anything about it.

Cribber
  • 2,513
  • 2
  • 21
  • 60
  • 2
    Does your code run fine from console? – ForceBru Nov 07 '15 at 12:31
  • just tried that and weirdly it works... so I guess the error is in pycharm somewhere? used the same python version as interpreter as I used to start from the console... – Cribber Nov 07 '15 at 12:38
  • can you run other Python code from PyCharm? The Python interpreter itself doesn't usually crash at all. That can happen if you've got some broken C/C++ packages installed – ForceBru Nov 07 '15 at 12:42
  • yes, I am able to run other python scripts from the same instance of pycharm, but this one script / file doesnt seem to work – Cribber Nov 07 '15 at 12:47
  • Possible duplicate of [What does error code 0xc0000135 mean when starting a .NET application?](http://stackoverflow.com/questions/11432940/what-does-error-code-0xc0000135-mean-when-starting-a-net-application) – Martin Evans Nov 07 '15 at 12:58
  • 1
    hmm. as I wrote all of my scripts with the same version of python/pygame/pycharm, this doesn't really relate to the .NET problem – Cribber Nov 07 '15 at 18:07
  • Can you start the python interactive interpreter alone? Does it happens after importing pygame or any other specific library? – memoselyk Nov 09 '15 at 05:24
  • i got this error in c not python what – larsaars Oct 27 '20 at 18:24

11 Answers11

11

reinstall python – you don't have python33.dll in c:\WINDOWS\system32\

Maybe you have different python versions – look at folders in root of c:

If yes, then point to your version of python.exe in pyCharm > Settings > Project Interpreter

Dunot
  • 190
  • 2
  • 8
6

This may be due to another program locking that memory location. Before you try more drastic measures, know that restarting the computer fixed the problem for me.

BarLr
  • 139
  • 1
  • 5
6

The error seems to be related to issues in native code (e.g. C/C++) and might be related to issues in loading some dll file. To know which file, the Windows "Event Viewer" is your friend.

The "Event Viewer" -> "Windows Logs" -> "Application" feed usually shows one or more rows for each crashed application and one of them should list the problematic filename.

Personally I observed similar issue with matplotlib on Python 3.9 (installed using Anaconda on Windows 10). I could see this kind of error when the code was executed using PyCharm. The same code just crashed with no visible errors when starting from Anaconda console.

The Event viewer then showed issue with freetype.dll. In this case, the problem was fixed by downgrading the packege from 2.11.0 to 2.10.4:

conda install freetype=2.10.4

Depending on the exact issue, I could imagine that removing pycache folder might help (like mentioned in other answers). Also, sometimes it might make sense to look at the PATH environment variable to actually understand why certain dll file is loaded from such a location.

Homan
  • 49
  • 6
Jonppe
  • 61
  • 1
  • 2
3

I got this error in PyCharm after upgrading pyarrow to the most recent version -- 0.16 --- using pip, running the same code I had ran before this update which used pandas read_parquet specifying the engine="pyarrow" triggering use of this library. After uninstalling and installing the previous version with

pip install pyarrow=="0.15"

the problem resolved.

wingwe
  • 41
  • 2
2

I encountered the same error when running .py in PyCharm on Windows. Inspired by https://thenewboston.com/forum/topic.php?id=10088, I uninstalled and reinstalled Python. When reinstalling, I checked the ADD PYTHON TO THE PATH Option. After recreating the virtual environment in PyCharm, the error was gone.

Update: On another Windows PC (64-bit), I encountered the same error where reinstalling Python was not enough. I tried two things.

  1. Uninstalling 32-bit Python and installing 64-bit Python. Namely downloading python-3.6.4-amd64.exe instead of python-3.6.4.exe
  2. Recreating the Pycharm project from github.

Between the two actions, the error was gone.

Big Pumpkin
  • 3,907
  • 1
  • 27
  • 18
2
taskkill /F /IM python.exe

Try this if it just happened out of the bloom and it worked normally before that error occurred.

s0xzwasd
  • 2,895
  • 3
  • 17
  • 26
Bruno
  • 31
  • 2
1

I solved it by disabling "PyQt compatible" checkbox in the Settings under Build, Execution, Deployment --> Python Debugger.

After that, it should debug properly.

FLBKernel
  • 860
  • 13
  • 21
1

Here is caused it and solution:

The computer had two physical processors. The code uses Numba for parallel computations. Upon disabling and re-enabling hyperthreading this issue started. To solve it clear pycache folder and run the program.

toddSteve
  • 21
  • 1
1

I encountered this error in my code as well, in my case the problem was sharing pickle which produced in Unix machine one a Windows one.

Green
  • 2,405
  • 3
  • 22
  • 46
0

**I faced the same situation and the malfunction stems from trying to run both terminal processor and graphical user interfaces. When I clicked the button program stopped running ** Solution: I disabled terminal inputs and work with graphics.

For example: if you do this

entry1=Entry(root,width=10).pack()
variable= str(input("Whats your name?"))

You will see the error.

if you delete either entry1 or variable, you will not see the problem.

ugur
  • 33
  • 9
-6

If you're trying create a .svm use dlib probably the problem is in .xml, some image that you use is cause the problem. Try to create a new .xml putting out a image(any image) or remove that your .xml and test, try this even you find out the image problem.

For exemple, the image "treinamento3.jpg" was the problem. I removed this command line:

< image file='delirium\treinamento3.jpg'>
    < box top='213' left='86' width='46' height='49'/ >
    < box top='531' left='47' width='125' height='123'/ >
  < /image >

from my .xml for solve my problem.

  • 1
    Hi Evan, welcome to Stackoverflow! This solution is very specific to your problem when creating an svm / with dlib. So I fear it won't be much help to others. Thank you nevertheless for your contribution! – Cribber Jul 27 '20 at 07:41