简体   繁体   English

无法在 Jupyter Notebook (Chrome) 中打开 PDF 文件

[英]Cannot open PDF file in Jupyter Notebook (Chrome)

I usually run my Jupyter Notebook on Chrome and can directly open PDF files by clicking on the file name.我通常在 Chrome 上运行我的 Jupyter Notebook,可以通过单击文件名直接打开 PDF 文件。

However after updating my Google Chrome browser, I noticed that I cannot open my PDF files using Jupyter Notebook anymore, and I get error message:但是,在更新我的 Google Chrome 浏览器后,我注意到我无法再使用 Jupyter Notebook 打开我的 PDF 文件,并且收到错误消息:

localhost is blocked
Requests to the server have been blocked by an extension.
Try disabling your extensions.
ERR_BLOCKED_BY_CLIENT

Chrome 错误:ERR_BLOCKED_BY_CLIENT

I have removed all extensions, browsing data, cookies etc. in my Chrome browser but the error still exists.已删除 Chrome 浏览器中的所有扩展程序、浏览数据、cookies 等,但错误仍然存在。

I have reinstalled my Chrome and my Anaconda several times.我已经多次重新安装了 Chrome 和 Anaconda。

I tried to debug this issue by using the inspect function by right clicking on the error page, and get 304 Not Modified我尝试通过右键单击错误页面使用检查 function 来调试此问题,并获得304 Not Modified304 未修改

I am not sure if it is something wrong with my chrome://flags/, and I have reset all to default.我不确定我的 chrome://flags/ 是否有问题,并且我已将所有内容重置为默认值。

I also tried Notebook in Microsoft Edge and Mozilla Firefox, all works fine with PDFs.我还尝试了 Microsoft Edge 和 Mozilla Firefox 中的 Notebook,它们都适用于 PDF。

However, when I rollback my Chrome version, Chrome+Jupyter is able to open PDF files.但是,当我回滚 Chrome 版本时,Chrome+Jupyter 能够打开 PDF 文件。

Finally, I can simply opening a PDF file using Chrome without using Jupyter Notebook.最后,我可以简单地使用 Chrome 打开 PDF 文件,而无需使用 Jupyter Notebook。 Still, I wish to figure out why I can't open it in Jupyter anymore.不过,我想弄清楚为什么我不能再在 Jupyter 中打开它了。

My Chrome version is: Version 88.0.4324.146 (Official Build) (64-bit)我的 Chrome 版本是:版本 88.0.4324.146 (Official Build) (64-bit)

I had a similar issue to you, and was able to resolve it following the advice in this similar thread我有一个类似的问题给你,并且能够按照这个类似线程中的建议解决它

My solution to this is that you should try to open it with jupyterLab.我对此的解决方案是您应该尝试使用 jupyterLab 打开它。 It works fine even in chrome.即使在 chrome 中也能正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM