Eclipse Mars 2、Pydev 5.1.2、Python 3.5を使用しています。私はリストの数が渡されるために取得するための簡単なコード(変数num
)を書き、整数のリストとして後続の各入力を印刷:入力を提供した後、Pydevデバッガが構文エラーをスローする
num=int(input()) #taking the no of lists to be inputted
n=[] #stores the elements in each list
for i in range(0,num): #iterating over the test cases
n = [int(x) for x in input().split()]
print("n: ",n)
私はfor
ループにブレークポイントを置きます。私はプログラムをデバッグすると、次のように、「リストの番号」を入力した後、私は実際のリストの要素、およびプレスを入力すると、「入力」、私は、構文エラーを取得:
プログラムは正常に実行されています。私はこのエラーはデバッグ中にのみ得ています。
私はこの原因を理解してください。
:マイケルによって要求されたコンソール出力、:
pydev debugger: starting (pid: 4172)
2
2 1
Traceback (most recent call last):
File "E:\software\dev tools\eclipse\eclipse-jee-neon-2-win32\dropins\plugins\org.python.pydev_5.5.0.201701191708\pysrc\_pydevd_bundle\pydevd_vars.py", line 354, in evaluate_expression
compiled = compile(expression, '<string>', 'eval')
File "<string>", line 1
2 1
^
SyntaxError: invalid syntax
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\software\dev tools\eclipse\eclipse-jee-neon-2-win32\dropins\plugins\org.python.pydev_5.5.0.201701191708\pysrc\_pydevd_bundle\pydevd_comm.py", line 1122, in do_it
result = pydevd_vars.evaluate_expression(self.thread_id, self.frame_id, self.expression, self.doExec)
File "E:\software\dev tools\eclipse\eclipse-jee-neon-2-win32\dropins\plugins\org.python.pydev_5.5.0.201701191708\pysrc\_pydevd_bundle\pydevd_vars.py", line 356, in evaluate_expression
Exec(expression, updated_globals, frame.f_locals)
File "E:\software\dev tools\eclipse\eclipse-jee-neon-2-win32\dropins\plugins\org.python.pydev_5.5.0.201701191708\pysrc\_pydevd_bundle\pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<string>", line 1
2 1
^
SyntaxError: invalid syntax
最初のエラーをテキストとして貼り付けて見やすくなりますか? – Michael
私はまだこのエラーの原因を理解できません。誰もこれに任意のリードを提供することはできますか?今のところ2ヶ月近く経ちました.... –