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
can't make IDLEX work with python._pth and python-3.6.0b2 #72708
Comments
on WinPython-64bit-3.6.0.0Zerorc2.exe, python-3.6.0b2 based, I can't get IDLEX working with "python._pth". If I put "Lib\site-packages\" in python._pth, python.exe dies. Could it be a python-3.6.0b2 bug, or just a wrong-doing from WinPython ? "Python._pth"= |
Might have to use a backslash in the path - I don't remember whether I tried to handle forward slashes or not, but I suspect not. Definitely tried it with site-packages though. |
python.exe crashes when I try this python._pth: all variation I try on Lib\site-packages do fail, when I not commenting # the line... I'm lost in thoughts: how adding a line in this file can make Python crash ? |
Can you tell me more about the crash? It doesn't cause a crash when I try it with my own install. |
I just see a windows screen poping up with (translated from french) "Python has stopped to work" a problem caused this program to stop working correctly. Windows is going to close this program and will inform you if a solution is available. |
Check in the Event Log viewer to see if there is an "Application Error" entry for python.exe. Also, if you run python.exe from a command prompt there may be more information displayed in the output. |
possible particularities of my PC vs yours:
with Windows 10, I don't know where is the even viewer. |
If you right-click the Start button, Event Viewer is near the top. |
I installed "WinPython-64bit-3.6.0.0Zerorc2.exe" on Windows 10. As you can see below, the included version of IDLEX depends on idlelib implementation details that have changed between 3.5 and 3.6: C:\WinPython36\python-3.6.0b2.amd64>.\python
Python 3.6.0b2 (default, Oct 10 2016, 21:15:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import idlexlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\WinPython36\python-3.6.0b2.amd64\Lib\site-packages\idlexlib\__init__.py", line 10, in <module>
from .idlexMain import version as __version__
File "C:\WinPython36\python-3.6.0b2.amd64\Lib\site-packages\idlexlib\idlexMain.py", line 46, in <module>
from idlexlib.extensionManager import extensionManager
File "C:\WinPython36\python-3.6.0b2.amd64\Lib\site-packages\idlexlib\extensionManager.py", line 60, in <module>
from idlelib.configHandler import idleConf, IdleConfParser
ModuleNotFoundError: No module named 'idlelib.configHandler' The "Unable to located" [sic] error is from the idlex.py script due to the above import error. I couldn't reproduce the crash due to python._pth. Your Windows application log should provide the DLL (module) and exception code for the crash, but a dump file would be even better. With the error reporting dialog still open, look for the crashed python.exe in the task manager details tab (the working set of the crashed process should be small -- about 100K). Right-click it and select the option to create a dump file. Zip the dump file and upload it here. |
Event Viewer says, when I put "Lub\site-packages" in python._pth: |
Thanks Eryk, So the root cause is that IDLEX is no more compatible with IDLE in python3.6. ==> I can survive this loss... Now, I don't if the "python._pth" crash is a problem, as I can stay with "#Lib\site-packages" for now. |
I don't know anything about 'python._pth' and whether there is any bug with respect to that. As far as IDLE goes, there is no bug and this issue should be closed. In bpo-24225, before the release of 3.6.0a2, most file names within idlelib were changed to shorter or lowercased names in conformance with PEP-8 and as anticipated by PEP-434. In particular, 'configHandler.py' is now 'config.py'. API changes within and between files are and will be much more disruptive to external users. As Nick Coughlin said in msg266409, 3rd party idlelib users are free to bundle or depend on a frozen copy of a past version. WinPython should test the third party modules it includes with the python it is releasing. Importing a module is as minimal as it gets. Consider reporting the incompatibility to them. |
You may have uncovered a bug in Python that's causing the invalid parameter handler to be invoked. It would help if you uploaded the zipped dump file for the crashed process. The status code you're getting (i.e. STATUS_STACK_BUFFER_OVERRUN, 0xC0000409) is used by the __fastfail intrinsic 1. The exception occurred in ucrtbase.dll at offset 0x6d5b8. In a debugger you can see it's in the CRT's invoke_watson function:
A fast fail executes an int 29h software interrupt, which gets handled by the following system function:
In this case the CRT passes a value of 5 (FAST_FAIL_INVALID_ARG) in register rcx (ecx), so it's not a critical security failure. |
I suspect there's a .pth file in site-packages that is importing something to trigger the failure. Without a crash dump (or debug build) it's going to be difficult to find it, but it is certainly an unwrapped invalid parameter termination. To save me some time, where can I get that build of WinPython from? |
hi Steve, You can grab it there https://sourceforge.net/projects/winpython/files/WinPython_3.6/3.6.0.0/betas/WinPython-64bit-3.6.0.0Zerorc2.exe/download |
maybe click on the "WinPython Command Prompt.exe" and do "pip uninstall IDLEX" as a first step. so you should see IDLE working |
It's a genuine bug in path processing, specifically how we handle buffer resizing. I'll make a fix. |
New changeset eea669163131 by Steve Dower in branch '3.6': New changeset 72e64fc8746b by Steve Dower in branch 'default': |
Fixed and added a test. (Yes I know that it's not the most efficient algorithm for joining the strings together, but I consider correctness to be more important here.) |
will it be in python-3.6.0b3 ? what should be in python._pth, in WinPython particular case ? |
Yes, see the commit to branch 3.6, which will next be released as .0b3. |
"Lib\site-packages" is probably unnecessary because of "import site", which likely adds it in anyway. It's very likely that WinPython doesn't actually want to specify this at all, since it also enables isolated mode, which will ignore PYTHONPATH and the current working directory. But if that's okay, you probably want::
That should give you the same default sys.path as if the file were omitted, except for the empty entry at the start and anything in PYTHONPATH or the registry. (I figured this out by running "python -S" and looking at sys.path.) |
Generally it's the script directory that isolated mode removes from sys.path. It's the working directory when there is no script. |
thank you all for the patch IDLEX was a requirement for a french examination. I think the reason was to see the line numbers on the left of the editor. For sure since IDLEX birth, IDLE has made some progress and IDLEX is becoming irrelevant, but this lovely tiny feature seems still missing. |
the "show line number on the left" feature is on the "github web editor", on "atom", and on "spyder" and "erik" python IDE, so rather the expected standard for python editing. |
bpo-17535 is about adding line numbers to IDLE editor. I have approved it in priciple, but not yet the proposed patch, or a revision thereof. |
the suggested python._pth change makes python unhappy:
Récipient d’erreurs 116251549737, type 5 Signature du problème : Fichiers joints : Ces fichiers sont peut-être disponibles ici : Symbole d’analyse : |
oups! I may have test the old one... |
it looks ok with 3.6.0b3 ... sorry for the false alarm |
Misc/NEWS
so that it is managed by towncrier #552Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: