Automate Publishing of Jupyter Notebooks as Medium Blog Posts with jupyter_to_medium




[ad_1]

I am officially releasing the Python package jupyter_to_medium, which allows you to deploy Jupyter Notebooks as Medium blog posts directly within your notebooks.

See the initial post – https://medium.com/dunder-data/jupyter-to-medium-initial-post-ecd140d339f0

Source


[ad_2]

Comment List

  • Dunder Data
    December 29, 2020

    I got this when publishing it. What should I do then?

    Failed to post to Medium

    Returned error message below

    "ValueError: Problem authenticating author:

    {"errors":[{"message":"Application not found","code":6005}]}

    Traceback (most recent call last):

    File "c:\users\chrome\appdata\local\programs\python\python38-32\lib\site-packages\jupyter_to_medium\_publish_to_medium.py", line 96, in get_author_id

    return r.json()['data']['id']

    KeyError: 'data'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

    File "c:\users\chrome\appdata\local\programs\python\python38-32\lib\site-packages\jupyter_to_medium\_bundler.py", line 37, in upload

    data = publish(**kwargs)

    File "c:\users\chrome\appdata\local\programs\python\python38-32\lib\site-packages\jupyter_to_medium\_publish_to_medium.py", line 300, in publish

    p.main()

    File "c:\users\chrome\appdata\local\programs\python\python38-32\lib\site-packages\jupyter_to_medium\_publish_to_medium.py", line 216, in main

    self.author_id = self.get_author_id()

    File "c:\users\chrome\appdata\local\programs\python\python38-32\lib\site-packages\jupyter_to_medium\_publish_to_medium.py", line 98, in get_author_id

    raise ValueError('Problem authenticating author: \n' + r.text)

    ValueError: Problem authenticating author:

    {"errors":[{"message":"Application not found","code":6005}]}

  • Dunder Data
    December 29, 2020

    After importing !pip install jupyter_to_medium. I didn't saw any "deploy as" option in the File menu !! Actually in which IDE this option will available. I check with anaconda, google collab, binder but there is no "deploy as" option !!

  • Dunder Data
    December 29, 2020

    hi! i tried doing this but i am getting this error.any help from your side would be appreciable.
    Returned error message below

    "UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 995390: character maps to

    Traceback (most recent call last):

    File "C:\desktop\Anaconda3\lib\site-packages\jupyter_to_medium\_bundler.py", line 37, in upload

    data = publish(**kwargs)

    File "C:\desktop\Anaconda3\lib\site-packages\jupyter_to_medium\_publish_to_medium.py", line 299, in publish

    p = Publish(filename, integration_token, pub_name, title, tags,

    File "C:\desktop\Anaconda3\lib\site-packages\jupyter_to_medium\_publish_to_medium.py", line 41, in _init_

    self.nb = self.get_notebook()

    File "C:\desktop\Anaconda3\lib\site-packages\jupyter_to_medium\_publish_to_medium.py", line 77, in get_notebook

    nb = nbformat.read(f, as_version=4)

    File "C:\desktop\Anaconda3\lib\site-packages\nbformat\__init__.py", line 138, in read

    buf = fp.read()

    File "C:\desktop\Anaconda3\lib\encodings\cp1252.py", line 23, in decode

    return codecs.charmap_decode(input,self.errors,decoding_table)[0]

    UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 995390: character maps to

    "

  • Dunder Data
    December 29, 2020

    Hi, this looks amazing but i keep getting this error. I'm probably being totally dense but any help gratefully recieved…

    "UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 5070: character maps to

    Traceback (most recent call last):

    File "C:\Users\james\anaconda3\lib\site-packages\jupyter_to_medium\_bundler.py", line 37, in upload

    data = publish(**kwargs)

    File "C:\Users\james\anaconda3\lib\site-packages\jupyter_to_medium\_publish_to_medium.py", line 299, in publish

    p = Publish(filename, integration_token, pub_name, title, tags,

    File "C:\Users\james\anaconda3\lib\site-packages\jupyter_to_medium\_publish_to_medium.py", line 41, in _init_

    self.nb = self.get_notebook()

    File "C:\Users\james\anaconda3\lib\site-packages\jupyter_to_medium\_publish_to_medium.py", line 77, in get_notebook

    nb = nbformat.read(f, as_version=4)

    File "C:\Users\james\anaconda3\lib\site-packages\nbformat\__init__.py", line 138, in read

    buf = fp.read()

    File "C:\Users\james\anaconda3\lib\encodings\cp1252.py", line 23, in decode

    return codecs.charmap_decode(input,self.errors,decoding_table)[0]

    UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 5070: character maps to
    "

  • Dunder Data
    December 29, 2020

    Nice work!! Could you please tell me how to do this same task if i am using colab jupyter notebook. I have tried with colab jupyter notebook it's not showing any option as deploy.

  • Dunder Data
    December 29, 2020

    This is cool man!. I will do share it on Linkedin so that people come to know about this cool package. Thanks a lot for coming up with this super helpful package.

Write a comment