Pythonwin.exe does not indicate the line of code for runtime errors The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experiencePython 3.1 and win32api dll not found errorHow to install pywin32 in virtualenv with python 2.7 64 bit?Error installing and running pywin32 2.7How do I install web2py in a virtualenv in Windows 7?Missing unknown .DLL when attempting to install pyWin32Incorrect version of Pywin32 causing Scrapy error?Can't get pywin32-219 to work with python 3.5Traceback using columns in pandasInstalling pywin32 for python 3.5 in windows 7Errors with importing TensorFlow
Is this wall load bearing? Blueprints and photos attached
When did F become S in typeography, and why?
Single author papers against my advisor's will?
In horse breeding, what is the female equivalent of putting a horse out "to stud"?
How can I protect witches in combat who wear limited clothing?
Derivation tree not rendering
Can a 1st-level character have an ability score above 18?
The variadic template constructor of my class cannot modify my class members, why is that so?
Take groceries in checked luggage
Can the prologue be the backstory of your main character?
How to pronounce 1ターン?
Am I ethically obligated to go into work on an off day if the reason is sudden?
Why can't wing-mounted spoilers be used to steepen approaches?
What can I do if neighbor is blocking my solar panels intentionally?
What is special about square numbers here?
ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?
How long does the line of fire that you can create as an action using the Investiture of Flame spell last?
What is this lever in Argentinian toilets?
Why is Captain Marvel translated as male in Portugal?
Did God make two great lights or did He make the great light two?
Can smartphones with the same camera sensor have different image quality?
how can a perfect fourth interval be considered either consonant or dissonant?
How do I add random spotting to the same face in cycles?
Who or what is the being for whom Being is a question for Heidegger?
Pythonwin.exe does not indicate the line of code for runtime errors
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experiencePython 3.1 and win32api dll not found errorHow to install pywin32 in virtualenv with python 2.7 64 bit?Error installing and running pywin32 2.7How do I install web2py in a virtualenv in Windows 7?Missing unknown .DLL when attempting to install pyWin32Incorrect version of Pywin32 causing Scrapy error?Can't get pywin32-219 to work with python 3.5Traceback using columns in pandasInstalling pywin32 for python 3.5 in windows 7Errors with importing TensorFlow
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
This is a tricky problem because it deals with the Pythonwin.exe user interface itself, and not my code.
When I run a file with the following code in it, I would expect that if it errors, it would show the line that it failed on in the traceback output
I literally just create an untainted 32-bit python 3.5 environment, installed pywin32, and opened my testfile.py to run it and here were the results.
Screenshot
If you see the line saying
File "C:testfile.py", line 2, in <module>
foo = 2 #this line works fine, but is identified as the traceback line
I would have expected this to point to line 5 and not line 2.
Inside a larger script, this is much more problematic as I need to guess which line caused the error based on the context.
To replicate my situation in an anaconda-based environment:
1. open the Anaconda Command Prompt
2. run the following lines to generate our environment
set CONDA_FORCE_32BIT=1
conda create -n test python=3.5
activate test
conda install -y pywin32
- Save "testfile.py" file with text:
#comment
foo = 2 #this line works fine, but is identified as the traceback line
a=2
a=3
a=b #this line causes the error, but isn't identified
- Open PythonWin.exe, open the "testfile.py" file and hit F5 or click Run
And it is not just an issue in anaconda installed environments.
If anyone has any insight into how to make it report the bad line of code, or why it is acting in this way, please let me know. Thanks!
runtime-error pywin32 traceback
add a comment |
This is a tricky problem because it deals with the Pythonwin.exe user interface itself, and not my code.
When I run a file with the following code in it, I would expect that if it errors, it would show the line that it failed on in the traceback output
I literally just create an untainted 32-bit python 3.5 environment, installed pywin32, and opened my testfile.py to run it and here were the results.
Screenshot
If you see the line saying
File "C:testfile.py", line 2, in <module>
foo = 2 #this line works fine, but is identified as the traceback line
I would have expected this to point to line 5 and not line 2.
Inside a larger script, this is much more problematic as I need to guess which line caused the error based on the context.
To replicate my situation in an anaconda-based environment:
1. open the Anaconda Command Prompt
2. run the following lines to generate our environment
set CONDA_FORCE_32BIT=1
conda create -n test python=3.5
activate test
conda install -y pywin32
- Save "testfile.py" file with text:
#comment
foo = 2 #this line works fine, but is identified as the traceback line
a=2
a=3
a=b #this line causes the error, but isn't identified
- Open PythonWin.exe, open the "testfile.py" file and hit F5 or click Run
And it is not just an issue in anaconda installed environments.
If anyone has any insight into how to make it report the bad line of code, or why it is acting in this way, please let me know. Thanks!
runtime-error pywin32 traceback
add a comment |
This is a tricky problem because it deals with the Pythonwin.exe user interface itself, and not my code.
When I run a file with the following code in it, I would expect that if it errors, it would show the line that it failed on in the traceback output
I literally just create an untainted 32-bit python 3.5 environment, installed pywin32, and opened my testfile.py to run it and here were the results.
Screenshot
If you see the line saying
File "C:testfile.py", line 2, in <module>
foo = 2 #this line works fine, but is identified as the traceback line
I would have expected this to point to line 5 and not line 2.
Inside a larger script, this is much more problematic as I need to guess which line caused the error based on the context.
To replicate my situation in an anaconda-based environment:
1. open the Anaconda Command Prompt
2. run the following lines to generate our environment
set CONDA_FORCE_32BIT=1
conda create -n test python=3.5
activate test
conda install -y pywin32
- Save "testfile.py" file with text:
#comment
foo = 2 #this line works fine, but is identified as the traceback line
a=2
a=3
a=b #this line causes the error, but isn't identified
- Open PythonWin.exe, open the "testfile.py" file and hit F5 or click Run
And it is not just an issue in anaconda installed environments.
If anyone has any insight into how to make it report the bad line of code, or why it is acting in this way, please let me know. Thanks!
runtime-error pywin32 traceback
This is a tricky problem because it deals with the Pythonwin.exe user interface itself, and not my code.
When I run a file with the following code in it, I would expect that if it errors, it would show the line that it failed on in the traceback output
I literally just create an untainted 32-bit python 3.5 environment, installed pywin32, and opened my testfile.py to run it and here were the results.
Screenshot
If you see the line saying
File "C:testfile.py", line 2, in <module>
foo = 2 #this line works fine, but is identified as the traceback line
I would have expected this to point to line 5 and not line 2.
Inside a larger script, this is much more problematic as I need to guess which line caused the error based on the context.
To replicate my situation in an anaconda-based environment:
1. open the Anaconda Command Prompt
2. run the following lines to generate our environment
set CONDA_FORCE_32BIT=1
conda create -n test python=3.5
activate test
conda install -y pywin32
- Save "testfile.py" file with text:
#comment
foo = 2 #this line works fine, but is identified as the traceback line
a=2
a=3
a=b #this line causes the error, but isn't identified
- Open PythonWin.exe, open the "testfile.py" file and hit F5 or click Run
And it is not just an issue in anaconda installed environments.
If anyone has any insight into how to make it report the bad line of code, or why it is acting in this way, please let me know. Thanks!
runtime-error pywin32 traceback
runtime-error pywin32 traceback
asked Mar 8 at 13:32
user2683482user2683482
63
63
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55064277%2fpythonwin-exe-does-not-indicate-the-line-of-code-for-runtime-errors%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55064277%2fpythonwin-exe-does-not-indicate-the-line-of-code-for-runtime-errors%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown