<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Files v3 Python Snippet error. in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Files-v3-Python-Snippet-error/m-p/922029#M71058</link>
    <description>&lt;P&gt;I believe there is an error on the Files v3 code snippet for Python&amp;nbsp;in the API Docs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code will throw an error:&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN class=""&gt;ImportError&lt;SPAN class=""&gt;: cannot import name 'ImportFromUrlInput' from 'hubspot.files'&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The import statement on the documentation reads:&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;from&amp;nbsp;hubspot.files&amp;nbsp;import&amp;nbsp;ImportFromUrlInput,&amp;nbsp;ApiException&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;However the file structure is&amp;nbsp;&lt;STRONG&gt;/files/files&lt;/STRONG&gt;,&amp;nbsp;so to make it work you have to modify it to:&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;EM&gt;from&amp;nbsp;&lt;STRONG&gt;hubspot.files.files&lt;/STRONG&gt;&amp;nbsp;import&amp;nbsp;ImportFromUrlInput,&amp;nbsp;ApiException&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;You have to also modify&amp;nbsp;
&lt;DIV&gt;&lt;EM&gt;api_response&amp;nbsp;=&amp;nbsp;&lt;STRONG&gt;client.files.files.files_api.&lt;/STRONG&gt;import_from_url&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 14 Feb 2024 10:07:59 GMT</pubDate>
    <dc:creator>Juanzabala</dc:creator>
    <dc:date>2024-02-14T10:07:59Z</dc:date>
    <item>
      <title>Files v3 Python Snippet error.</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Files-v3-Python-Snippet-error/m-p/922029#M71058</link>
      <description>&lt;P&gt;I believe there is an error on the Files v3 code snippet for Python&amp;nbsp;in the API Docs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code will throw an error:&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN class=""&gt;ImportError&lt;SPAN class=""&gt;: cannot import name 'ImportFromUrlInput' from 'hubspot.files'&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The import statement on the documentation reads:&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;from&amp;nbsp;hubspot.files&amp;nbsp;import&amp;nbsp;ImportFromUrlInput,&amp;nbsp;ApiException&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;However the file structure is&amp;nbsp;&lt;STRONG&gt;/files/files&lt;/STRONG&gt;,&amp;nbsp;so to make it work you have to modify it to:&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;EM&gt;from&amp;nbsp;&lt;STRONG&gt;hubspot.files.files&lt;/STRONG&gt;&amp;nbsp;import&amp;nbsp;ImportFromUrlInput,&amp;nbsp;ApiException&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;You have to also modify&amp;nbsp;
&lt;DIV&gt;&lt;EM&gt;api_response&amp;nbsp;=&amp;nbsp;&lt;STRONG&gt;client.files.files.files_api.&lt;/STRONG&gt;import_from_url&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Feb 2024 10:07:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Files-v3-Python-Snippet-error/m-p/922029#M71058</guid>
      <dc:creator>Juanzabala</dc:creator>
      <dc:date>2024-02-14T10:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Files v3 Python Snippet error.</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Files-v3-Python-Snippet-error/m-p/922713#M71079</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/116722"&gt;@Juanzabala&lt;/a&gt;&lt;/SPAN&gt;, I hope that you are well!&lt;BR /&gt;&lt;BR /&gt;Thank you for asking the Community and for your valuable feedback!&lt;BR /&gt;&lt;BR /&gt;I understand that you are trying to&lt;A href="https://developers.hubspot.com/docs/api/files/files" target="_blank"&gt; import a file from a URL into the file manager via API&lt;/A&gt; but you mentioned an error in the code provided on the documentation.&lt;BR /&gt;&lt;BR /&gt;I will check this for you internally and let you know if there is any update needed.&lt;BR /&gt;&lt;BR /&gt;Also, if anybody else has anything to add and/or share, please feel free to join in the conversation &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks a lot and have a lovely day!&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 15:55:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Files-v3-Python-Snippet-error/m-p/922713#M71079</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2024-02-14T15:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Files v3 Python Snippet error.</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Files-v3-Python-Snippet-error/m-p/934553#M71504</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/116722"&gt;@Juanzabala&lt;/a&gt;&lt;/SPAN&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you for your patience!&lt;BR /&gt;&lt;BR /&gt;The Team has now updated the code accordingly!&lt;BR /&gt;&lt;BR /&gt;I hope this helps and works for you now.&lt;BR /&gt;&lt;BR /&gt;Have a nice day!&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 15:05:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Files-v3-Python-Snippet-error/m-p/934553#M71504</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2024-02-28T15:05:08Z</dc:date>
    </item>
  </channel>
</rss>

