<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Seeing Python Syntax Errors in VS Code in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9139894#M13242</link>
    <description>&lt;P&gt;In the new VS Code debugger (which is mostly working well for me (and which I like much better than the old IDE)), I can't figure out where syntax errors are reported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm more of a C++ guy and make a lot of little syntax errors when writing Python code.&amp;nbsp; Every time I make such an error the following happens:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I click the DEBUG button in the scrip window.&lt;/LI&gt;&lt;LI&gt;VS Code launches and opens the correct file.&lt;/LI&gt;&lt;LI&gt;I click F5 in the VS window.&lt;/LI&gt;&lt;LI&gt;VS "thinks" for anywhere from a few milliseconds to several seconds.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;And then nothing.&amp;nbsp; It doesn't start the debugger.&amp;nbsp; It doesn't report an error message (or any problems).&amp;nbsp; Just nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I stare at the code until I see the syntax error, fix it, repeat the same process and the debugger starts and steps to "main".&amp;nbsp; As my code size grows this is becoming unworkable; staring works better on a short test program than on a longer more product oriented program.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It must be generating an error message like "unexpected semicolon on line 31", but I don't know where to look.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2019 19:16:28 GMT</pubDate>
    <dc:creator>KennethOfLeesburg</dc:creator>
    <dc:date>2019-11-11T19:16:28Z</dc:date>
    <item>
      <title>Seeing Python Syntax Errors in VS Code</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9139894#M13242</link>
      <description>&lt;P&gt;In the new VS Code debugger (which is mostly working well for me (and which I like much better than the old IDE)), I can't figure out where syntax errors are reported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm more of a C++ guy and make a lot of little syntax errors when writing Python code.&amp;nbsp; Every time I make such an error the following happens:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I click the DEBUG button in the scrip window.&lt;/LI&gt;&lt;LI&gt;VS Code launches and opens the correct file.&lt;/LI&gt;&lt;LI&gt;I click F5 in the VS window.&lt;/LI&gt;&lt;LI&gt;VS "thinks" for anywhere from a few milliseconds to several seconds.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;And then nothing.&amp;nbsp; It doesn't start the debugger.&amp;nbsp; It doesn't report an error message (or any problems).&amp;nbsp; Just nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I stare at the code until I see the syntax error, fix it, repeat the same process and the debugger starts and steps to "main".&amp;nbsp; As my code size grows this is becoming unworkable; staring works better on a short test program than on a longer more product oriented program.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It must be generating an error message like "unexpected semicolon on line 31", but I don't know where to look.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 19:16:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9139894#M13242</guid>
      <dc:creator>KennethOfLeesburg</dc:creator>
      <dc:date>2019-11-11T19:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Seeing Python Syntax Errors in VS Code</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9140311#M13243</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Hi Mr. KennethOfLeesburg&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please consider checking (using outside to &lt;EM&gt;&lt;STRONG&gt;F360&lt;/STRONG&gt;&lt;/EM&gt; docs) &lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;STRONG&gt;linting processes in Python environment&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;In &lt;EM&gt;&lt;STRONG&gt;VSCode&lt;/STRONG&gt;&lt;/EM&gt; the process can be activated from &lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#800080"&gt;&amp;lt;View&amp;gt;&amp;lt;Command Palette...&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;. Type at the prompt &lt;FONT color="#800080"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;Lint...&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;and you will see available options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Regards&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;MichaelT&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 00:19:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9140311#M13243</guid>
      <dc:creator>MichaelT_123</dc:creator>
      <dc:date>2019-11-12T00:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Seeing Python Syntax Errors in VS Code</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9141121#M13244</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3995186"&gt;@KennethOfLeesburg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can follow method suggested by&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2900239"&gt;@MichaelT_123&lt;/a&gt;&amp;nbsp;.&lt;BR /&gt;Same thing you can achieve by&amp;nbsp; setting flag&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;"python.linting.pylintEnabled" to true in settings.json file present in the .vscode directory as shown in screenshot"Enableflag.png".&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Enableflag.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/697041i1B9D486A5829CA48/image-size/large?v=v2&amp;amp;px=999" role="button" title="Enableflag.PNG" alt="Enableflag.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;And if you have not installed pylint, vscode will ask you to install the same with a poup message.&lt;BR /&gt;Once setup is done, pylint will start showing you the warnings in the 'PROBLEMS' window of vscode after you save the changes as shown in example "DemoWarning.png".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DemoWarning.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/697042i28F658D37FA3BF06/image-size/large?v=v2&amp;amp;px=999" role="button" title="DemoWarning.PNG" alt="DemoWarning.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;For further your reference -&lt;BR /&gt;Currently pylint is also showing warning for import of adsk.core,adsk.fusion &amp;amp; adsk.cam modules even-though we have added the extra def paths to the vscode (Still script will run successfully). That's why we are setting "python.linting.pylintEnabled" flag to "false" before opening sripts to avoid confusion. We are working on addressing this issue.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FalseNegativeWarning.png" style="width: 921px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/697044i061F0CDB9E911CF2/image-size/large?v=v2&amp;amp;px=999" role="button" title="FalseNegativeWarning.png" alt="FalseNegativeWarning.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 11:19:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9141121#M13244</guid>
      <dc:creator>Nilesh.Mohite</dc:creator>
      <dc:date>2019-11-12T11:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Seeing Python Syntax Errors in VS Code</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9266804#M13245</link>
      <description>&lt;P&gt;VSCode only supports one directory in the PythonPath so it raises exceptions on import adsk.core.&lt;BR /&gt;Asked my son about it (he's a computer genius, not like his dad).&lt;/P&gt;&lt;P&gt;So it seems, all that is needed is to add a comment after the import to tell Pylint what to do.&lt;/P&gt;&lt;P&gt;with this sort of line, the pylintEnabled can be set to true:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import adsk.core, adsk.fusion # pylint: disable=import-error&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 12:46:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9266804#M13245</guid>
      <dc:creator>franck.gressier</dc:creator>
      <dc:date>2020-01-22T12:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Seeing Python Syntax Errors in VS Code</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9276322#M13246</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5911467"&gt;@franck.gressier&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We will surely look in to it.&amp;nbsp;&lt;BR /&gt;Special thanks to your son for his help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 09:21:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/seeing-python-syntax-errors-in-vs-code/m-p/9276322#M13246</guid>
      <dc:creator>Nilesh.Mohite</dc:creator>
      <dc:date>2020-01-27T09:21:49Z</dc:date>
    </item>
  </channel>
</rss>

