error! C:\file\example.db is not UTF-8 encoded ipython notebook

前端 未结 3 1883
[愿得一人]
[愿得一人] 2021-01-21 00:49

please help! I am using sqlite3 in ipython notebook to create an SQL database. I think I have successfully created the database, but when I go to look at it I am receiving an en

3条回答
  •  悲哀的现实
    2021-01-21 01:37

    This may be a known Jupyter issue, specifically: https://github.com/jupyterhub/jupyterhub/issues/1572

    I experienced the same problem with ReportLab. I created a PDF file, and tried to open it from within the Jupyter web interface (on the "tree" page). I received much the same error message.

    The first thing to do is verify outside of Jupyter that the file was created successfully.

    The only thing I can add to the documentation on the GitHub issue is that although the output from using "view" in the URL instead of "edit" may look blank, view source will show that Jupyter served a correctly-formed HTML page with a reference to the correctly-formed file, but that something is preventing the file from getting to a PDF renderer (or whatever you need for your DB file).

    I am still working on the complete solution, which involves some settings for the Jupyter server that we haven't figured out yet. I'll come back and edit this post when the solution is found. However, be assured that UTF-8 encoding is not the root cause here, at least as far as the file itself is concerned.

提交回复
热议问题