# Files v3 Python Snippet error.

**URL:** <https://community.hubspot.com/t/files-v3-python-snippet-error/100088>\
**Category:** APIs & Integrations\
**Tags:** python\
**Created:** [February 13, 2024, 6:03pm UTC](https://community.hubspot.com/t/files-v3-python-snippet-error/100088 "2024-02-13T18:03:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juanzabala](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/juanzabala/32/2490_2.png) [@Juanzabala](https://community.hubspot.com/u/Juanzabala)\
**Post date:** [February 13, 2024, 6:03pm UTC](https://community.hubspot.com/t/files-v3-python-snippet-error/100088/1 "2024-02-13T18:03:58Z")

</div>

I believe there is an error on the Files v3 code snippet for Python in the API Docs.

The code will throw an error: _ **ImportError: cannot import name ‘ImportFromUrlInput’ from ‘hubspot.files’** _

The import statement on the documentation reads:

**from hubspot.files import ImportFromUrlInput, ApiException**

However the file structure is **/files/files** , so to make it work you have to modify it to:

_from **hubspot.files.files** import ImportFromUrlInput, ApiException_

You have to also modify

_api\_response = \*\*client.files.files.files\_api.\*\*import\_from\_url_

 ![922029_1_Screenshot 2024-02-13 at 17.24.36.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/e/9e069e8bacbec8ba3a556076e1882f5715825d0d.png)

 ![922029_2_Screenshot 2024-02-13 at 17.23.54.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/b/5b1e3549165febbd35024edb2196fb53e197d66e.jpeg)

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [February 14, 2024, 3:55pm UTC](https://community.hubspot.com/t/files-v3-python-snippet-error/100088/2 "2024-02-14T15:55:56Z")

</div>

Hi @Juanzabala, I hope that you are well!  
Thank you for asking the Community and for your valuable feedback!  
I understand that you are trying to[import a file from a URL into the file manager via API](https://developers.hubspot.com/docs/api/files/files) but you mentioned an error in the code provided on the documentation.  
I will check this for you internally and let you know if there is any update needed.  
Also, if anybody else has anything to add and/or share, please feel free to join in the conversation 🙂  
Thanks a lot and have a lovely day!  
Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [February 28, 2024, 3:05pm UTC](https://community.hubspot.com/t/files-v3-python-snippet-error/100088/3 "2024-02-28T15:05:08Z")

</div>

Hi @Juanzabala,  
Thank you for your patience!  
The Team has now updated the code accordingly!  
I hope this helps and works for you now.  
Have a nice day!  
Best,  
Bérangère
