【发布时间】:2021-12-16 19:23:10
【问题描述】:
我有以下代码行来接受标识符:
security = input("Insert ID")
这在我的 python 上效果很好。但是,当我将笔记本发送给同事时,会出现此错误:
StdinNotImplementedError Traceback (most recent call last)
<ipython-input-1-324a5244d6ce> in <module>
1 ## Insert NIM/PREL or active Bond here
----> 2 security = input("Insert Bond ID or Figi # -- e.x. 025816CH0 Corp, BBG012JJ3534 ") #BQ3149326 credit ag #BQ4561651 jag #025816CH0 AMEX #BR0344159 PREL EXAMPLE #BR1139871 PREL INR
C:\axy\py\environments\quant2\lib\site-packages\ipykernel\kernelbase.py in raw_input(self, prompt)
853 if not self._allow_stdin:
854 raise StdinNotImplementedError(
--> 855 "raw_input was called, but this frontend does not support input requests."
856 )
857 return self._input_request(str(prompt),
StdinNotImplementedError: raw_input was called, but this frontend does not support input requests.
什么可能导致这种不匹配?
【问题讨论】:
-
我编辑了这个问题以澄清您的确切要求。如果我误解了,一定要edit 修复它。如果您这样做,LMK 可以更新我的答案。我假设您已阅读并理解错误消息,但您对细节感到困惑。