Skip to content

Instantly share code, notes, and snippets.

@jph00
Created January 19, 2020 22:03
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jph00/407562c3b371f0fdc61826a4927a1dab to your computer and use it in GitHub Desktop.
/nbs/blog_test.ipynb
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gsanc018
Copy link

I'm getting a syntax error?
File "upd_md.py", line 3 print(re.sub(r'^(!.*]\()(\w+_files/)', r'\1/images/\2', f), end='') ^ SyntaxError: invalid syntax

I just copied and pasted ):

@jph00
Copy link
Author

jph00 commented Jan 21, 2020 via email

@gsanc018
Copy link

Ah yes, using python3 worked. Thanks a bunch!

@lecidhugo
Copy link

Hi,
After executing:
nbdev_nb2md name.ipynb
I only got name.ipynb but not the folder name_files although I included screenshots in name.ipynb. After commit, the screenshots are missed.
great work, btw :)

@mazeyang
Copy link

mazeyang commented Feb 1, 2020

Hi, after executing:

nbdev_nb2md name.ipynb

I got: ** UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 103: illegal multibyte sequence. **
I have set encoding like this:

for f in fileinput.input(inplace=True, openhook=fileinput.hook_encoded(encoding="utf-8")):

but this ERROR still occurs... what happened?

Thank you!

@mazeyang
Copy link

mazeyang commented Feb 1, 2020

Hi, after executing:

nbdev_nb2md name.ipynb

I got: UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 103: illegal multibyte sequence.
I have set encoding like this:

for f in fileinput.input(inplace=True, openhook=fileinput.hook_encoded(encoding="utf-8")):

but this ERROR still occurs... what happened?

Thank you!

@hargun3045
Copy link

After the command,
nbdev_nb2md blog_test.ipynb
If by chance anyone is getting the following error
AssertionError: Use create_config to create settings.ini for the first time
You will need a settings.ini file in the same directory as where you're running the command. Download settings.ini from here
For more information and help look here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment