[
https://issues.apache.org/jira/browse/NETBEANS-2797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Laszlo Kishalmi resolved NETBEANS-2797.
---------------------------------------
Resolution: Invalid
Well,
First, the python{color:#333333} plugins has not yet in the hands of Apache
NetBeans it will be donated later down the road.{color}
{color:#333333}Second, There could be differences with your command line
environment and the environment provided by NetBeans. Make sure that either set
the environments the same, or prepare you application to accommodate to these
differences. If you really think that it is an IDE issue then Analyze further
what the issue really is and file a specific bug or implementation
request.{color}
{color:#333333}Also this issue might block your personal work with the IDE, but
surely does not affect those who are working with Java, Java EE, HTML 5 and
PHP. So this issue might be a major, but certainly not a blocker and not even
critical.{color}
> Python project run inside NB raising exception while not in command line
> ------------------------------------------------------------------------
>
> Key: NETBEANS-2797
> URL: https://issues.apache.org/jira/browse/NETBEANS-2797
> Project: NetBeans
> Issue Type: Bug
> Affects Versions: 8.2, 11.0
> Environment: Windows, NB11.0, NB8.2
> Reporter: Gururaj
> Priority: Blocker
> Labels: NB11, NB8.2, Python3
>
> If I run a python script, exception is occurring only in NB. If I execute the
> same script with same python interpreter on command line, no exception is
> raised.
> Created sample project "sample_1" with a python test source file. After
> running the project NB output window showing below error:
> {code:java}
> Traceback (most recent call last):
> File
> "C:\Users\Srinivag\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py",
> line 2320, in read_nonblocking
> s = self.readConsoleToCursor()
> File
> "C:\Users\Srinivag\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py",
> line 2226, in readConsoleToCursor
> if not self.__consout:
> AttributeError: 'Wtty' object has no attribute '_Wtty__consout'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
> File
> "C:\Users\Srinivag\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py",
> line 1414, in expect_loop
> c = self.read_nonblocking(self.maxread, timeout)
> File
> "C:\Users\Srinivag\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py",
> line 1790, in read_nonblocking
> s = self.wtty.read_nonblocking(timeout, size)
> File
> "C:\Users\Srinivag\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py",
> line 2341, in read_nonblocking
> raise EOF('End Of File (EOF) in Wtty.read_nonblocking().')
> wexpect.EOF: End Of File (EOF) in Wtty.read_nonblocking().
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
> File
> "C:\Users\Srinivag\Documents\NetBeansProjects\sample_1\src\wexpect_test.py",
> line 21, in <module>
> main()
> File
> "C:\Users\Srinivag\Documents\NetBeansProjects\sample_1\src\wexpect_test.py",
> line 16, in main
> child.expect('Enter your user-id/password and clearance level:')
> File
> "C:\Users\Srinivag\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py",
> line 1347, in expect
> return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
> File
> "C:\Users\Srinivag\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py",
> line 1361, in expect_list
> return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
> File
> "C:\Users\Srinivag\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py",
> line 1432, in expect_loop
> raise EOF (str(e) + '\n' + str(self))
> wexpect.EOF: End Of File (EOF) in Wtty.read_nonblocking().
> <wexpect.spawn_windows object at 0x00000184A8499358>
> version: 0.0.1.unkown0 ($Revision: 399 $)
> command: C:\WINDOWS\system32\telnet.EXE
> args: ['C:\\WINDOWS\\system32\\telnet.EXE', '10.61.252.10']
> searcher: searcher_re:
> 0: re.compile("Enter your user-id/password and clearance level:")
> buffer (last 100 chars):
> before (last 100 chars):
> after: <class 'wexpect.EOF'>
> match: None
> match_index: None
> exitstatus: None
> flag_eof: False
> pid: 2460
> child_fd: None
> closed: False
> timeout: 30
> delimiter: <class 'wexpect.EOF'>
> logfile: None
> logfile_read: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1252'>
> logfile_send: None
> maxread: 2000
> ignorecase: False
> searchwindowsize: None
> delaybeforesend: 0.05
> delayafterclose: 0.1
> delayafterterminate: 0.1
> {code}
> The code sample_1:wexpect_test.py is as below:
> {code:java}
> # To change this license header, choose License Headers in Project Properties.
> # To change this template file, choose Tools | Templates
> # and open the template in the editor.
> __author__ = "SrinivaG"
> __date__ = "$Jul 3, 2019 11:19:06 AM$"
> import sys
> import wexpect
> def main():
> child = wexpect.spawn('telnet 10.61.252.10')
> child.logfile_read = sys.stdout
> child.expect('Enter your user-id/password and clearance level:')
> child.sendline("gururaj/gjois1234")
> if __name__ == "__main__":
> main()
> {code}
> If I execute same file in Windows command line, no exception occurs:
> {code:java}
> PS C:\Users\Srinivag>
> C:\Users\Srinivag\AppData\Local\Programs\Python\Python37\python.exe
> C:\Users\Srinivag\Documents\NetBeansProjects\sample_1\src\wexpect_test.py
> Enter your user-id/password and clearance level: >
> PS C:\Users\Srinivag>
> {code}
> Python path configured in Tools->Python
> Platforms->"C:\Users\Srinivag\AppData\Local\Programs\Python\Python37\python.exe"
> Reproducible in both NB8.2 and NB11.0
> Installed below plugin for python project:
> [http://plugins.netbeans.org/plugin/61688/python]
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists