<?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 Bizarre Delta Tables pipeline error: ModuleNotFound in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/bizarre-delta-tables-pipeline-error-modulenotfound/m-p/55168#M30252</link>
    <description>&lt;P&gt;I received the following error when trying to import a function defined in a .py file into a .ipynb file. I would add code blocks, but the message keeps getting rejected for invalid HTML.&lt;/P&gt;&lt;P&gt;# test_lib.py (same directory, in a subfolder)&lt;BR /&gt;def square(x):&lt;BR /&gt;return x * x&lt;/P&gt;&lt;P&gt;# dlt_pipeline.ipynb&lt;BR /&gt;import dlt&lt;BR /&gt;import sys&lt;BR /&gt;import os&lt;BR /&gt;from pathlib import Path&lt;BR /&gt;sys.path.append(os.path.abspath('..'))&lt;BR /&gt;from pyspark.sql.functions import expr&lt;BR /&gt;from test_lib import square # Error is here&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;ModuleNotFoundError: No module named 'test_lib',None,Map(),Map(),List(),List(),Map())&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;I was using Asset Bundles when this occurred. The error makes no sense to me because (1) I can import that function when I run the .ipynb file locally, or even when I manually run it on DB using my personal cluster, and (2) the&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;',None,Map(),Map(),List(),List(),Map()' at the end seems to come from nowhere. Any help in solving this would be very much appreciated. Thank you!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 12 Dec 2023 21:33:05 GMT</pubDate>
    <dc:creator>Geoff</dc:creator>
    <dc:date>2023-12-12T21:33:05Z</dc:date>
    <item>
      <title>Bizarre Delta Tables pipeline error: ModuleNotFound</title>
      <link>https://community.databricks.com/t5/data-engineering/bizarre-delta-tables-pipeline-error-modulenotfound/m-p/55168#M30252</link>
      <description>&lt;P&gt;I received the following error when trying to import a function defined in a .py file into a .ipynb file. I would add code blocks, but the message keeps getting rejected for invalid HTML.&lt;/P&gt;&lt;P&gt;# test_lib.py (same directory, in a subfolder)&lt;BR /&gt;def square(x):&lt;BR /&gt;return x * x&lt;/P&gt;&lt;P&gt;# dlt_pipeline.ipynb&lt;BR /&gt;import dlt&lt;BR /&gt;import sys&lt;BR /&gt;import os&lt;BR /&gt;from pathlib import Path&lt;BR /&gt;sys.path.append(os.path.abspath('..'))&lt;BR /&gt;from pyspark.sql.functions import expr&lt;BR /&gt;from test_lib import square # Error is here&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;ModuleNotFoundError: No module named 'test_lib',None,Map(),Map(),List(),List(),Map())&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;I was using Asset Bundles when this occurred. The error makes no sense to me because (1) I can import that function when I run the .ipynb file locally, or even when I manually run it on DB using my personal cluster, and (2) the&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;',None,Map(),Map(),List(),List(),Map()' at the end seems to come from nowhere. Any help in solving this would be very much appreciated. Thank you!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Dec 2023 21:33:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bizarre-delta-tables-pipeline-error-modulenotfound/m-p/55168#M30252</guid>
      <dc:creator>Geoff</dc:creator>
      <dc:date>2023-12-12T21:33:05Z</dc:date>
    </item>
  </channel>
</rss>

