Incorrect format for Python files

Whenever I attempt to save my Python code from Jupyter notebook to my computer, the file format is .pdf instead of .py

Don’t know what I did to cause this problem. Can someone help?

Hi Herman,

I received your email and was going to suggest you post in our forums so thanks for putting it here. I haven’t seen this issue before but hopefully we can help you figure it out. I didn’t realize this was even a possibility but there are many articles discussing how to save as PDF:

Jupyter Notebook to PDF in a few lines | by Cornellius Yudha Wijaya | Towards Data Science

So what I’m wondering is if somehow you installed an extra package accidentally? Can you take a screenshot of what your directory looks like so we can learn a bit more?


Hi Dennis,

Thanks for getting back to me.

Here are two screenshots. The first is my directory, while the second is the display in the bottom left corner of my screen showing the Adobe format for my .py file. Your tutorial does not have the Adobe format so I’m sure I must have mistakenly given Adobe Reader permission to open this file in their format. Just don’t know how to change it.



Got it. So it sounds like there was an association made with .py files that happened on accident. See if this helps at all:

How to associate a file with a program in Windows (

I used to use Jupiter but since I have discovered Thonny which is very nice and works really well with the Tello.


Thanks for your help. The article was exactly what I needed to disassociate my python file from Adobe Reader.

I’d like to post my next question on the forum, but don’t see an option to upload an attachment. If there’s a way to do so, please let me know.

Question: I’m new to command line and would like to run a python file on it as Dennis did in Step 1 of the DroneBlocks Python tutorial. I keep getting an error message whenever I try to run it. My file is saved in my Downloads folder. Please see screen shot. Would appreciate anyone’s help.

I would suggest the following based on your screenshot:

  1. cd into your Downloads directory

  2. Execute the python script with: python (or whatever the file name is)

Does that work for you?