<?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 Re: Can't load environment resource to notebook in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-t-load-environment-resource-to-notebook/m-p/4126637#M3829</link>
    <description>&lt;P&gt;Yes, my environment also had the Int96RebaseModeInWrite set to CORRECTED (but I don't know how that would impact the resources). Anyway, I set up an all new workspace, environment and notebook and it worked, so whatever. Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2024 08:40:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-08-30T08:40:12Z</dc:date>
    <item>
      <title>Can't load environment resource to notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-t-load-environment-resource-to-notebook/m-p/4126320#M3822</link>
      <description>&lt;P&gt;With the last update came environment resources; however, if I try to load one into my notebook, it fails. I click in the meatball menu of the file on "Open in notebook" and it gives me this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import matplotlib.pyplot as plt
import matplotlib.image as mpimg
# Load image
image = mpimg.imread(f"{notebookutils.nbResPath}/env/drake_tech_support.gif")
# Let the axes disappear
plt.axis('off')
# Plot image in the output
image_plot = plt.imshow(image)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This yields this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FileNotFoundError: [Errno 2] No such file or directory: '/env/drake_tech_support.gif'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"notebookutils.nbResPath" alone gives "/synfs/nb_resource", adding this manually into the file path doesn't change anything.&lt;/P&gt;&lt;P&gt;What is going on?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 06:01:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-t-load-environment-resource-to-notebook/m-p/4126320#M3822</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-30T06:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can't load environment resource to notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-t-load-environment-resource-to-notebook/m-p/4126474#M3826</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to replicate your error but I was unable to.&amp;nbsp;&lt;/P&gt;&lt;P&gt;After creating a completely new environment with a .gif and attaching that to a new notebook I was able to load the image the exact same way as you did.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hofpower_0-1725002185108.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1159764i950DF5A35F35B641/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hofpower_0-1725002185108.png" alt="Hofpower_0-1725002185108.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you do anything else in the notebook before loading the .gif or did you change any other settings in your environment besides uploading the file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not I would advise you to try again and if the error still persists maybe contact MSFT support so they can check telemetry data on your session and environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 07:20:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-t-load-environment-resource-to-notebook/m-p/4126474#M3826</guid>
      <dc:creator>Hofpower</dc:creator>
      <dc:date>2024-08-30T07:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can't load environment resource to notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-t-load-environment-resource-to-notebook/m-p/4126622#M3828</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous,&lt;/P&gt;
&lt;P&gt;Where are the file stored? Can you please share some more detail about these? For my test scenario, I upload a gif file to the Lakehouse files folder and environment and copy the file API path and relative path to use mpimg.imread path to read it and it works well.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import matplotlib.animation as animation

# Load the GIF file
gif_path = '/lakehouse/default/Files/Picture1.gif'

# Load the GIF file from environment
#gif_path = f"{notebookutils.nbResPath}/env/Test/Picture1.gif"

img = mpimg.imread(gif_path)

fig, ax = plt.subplots()
plt.axis("off")
im = ax.imshow(img)

plt.show(im)&lt;/LI-CODE&gt;
&lt;P&gt;If you failed to load resource, have you check if the used environment is include upload the files instead of the default environment?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 08:25:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-t-load-environment-resource-to-notebook/m-p/4126622#M3828</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-30T08:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can't load environment resource to notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-t-load-environment-resource-to-notebook/m-p/4126637#M3829</link>
      <description>&lt;P&gt;Yes, my environment also had the Int96RebaseModeInWrite set to CORRECTED (but I don't know how that would impact the resources). Anyway, I set up an all new workspace, environment and notebook and it worked, so whatever. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 08:40:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-t-load-environment-resource-to-notebook/m-p/4126637#M3829</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-30T08:40:12Z</dc:date>
    </item>
  </channel>
</rss>

