![](/img/trans.png)
[英]My robot process automation script fails when executed through local Jenkins but works fine when run through console
[英]Script works when run through normal python interpreter but fails when run through jupyter
我正在使用 VSCode 和 jupyter(用 python 3.9.7 编写)我在这里有两个问题:
第一个问题,我有一个脚本,我已将其编写为 .py 文件并希望通过 jupyter 运行它,以便我可以使用它的变量查看器(我讨厌 vscode 的内置变量查看器的工作方式杂乱无章),它有效当我在没有 jupyter 的情况下正常运行它时(使用 f5/ctrl+f5 等)但是当我尝试使用 jupyter 运行它时,出于某种原因,它似乎忽略了 sys 导入和路径编辑以启用对另一个脚本的调用。
为什么会发生这种情况,我该如何解决?
其次,如何通过jupyter进入调试模式? 我发现您可以右键单击然后点击“在交互式窗口中运行当前文件”及其其他运行选项以使用 jupyter 启动脚本,但似乎没有办法进入逐行调试。 我如何进入调试?
我认为cwd
的差异导致了它。 您可以尝试使用绝对路径附加路径吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.