Getting error 'module not found'
Hi everyone,
I am trying to run a Notebook in Fabric, but I am getting the error 'module not found'. And I tried many things to fix this, but I can't. I was wondering if somebody can help me. This is the case:
  1. I created a workspace and a Lakehouse.
  2. In the Lakehouse (in the Files folder) I have a .py script called Functions plus an .env file with a subscription API key.
  3. Then I opened a new Notebook (which is saved in the same workspace) and in this Notebook I want to get data with an API (using the key) and I want to import the .py script Functions as Func.
This is one of the different codes I have tried, but it can't read the .env file nor does it find the .py script Functions.
import os
from dotenv import load_dotenv
load_dotenv()
from Files import Functions as Func
I am totally new to this and I have no idea what I am doing wrong. Can anyone help me with tips?
1
3 comments
Angela Audhoe
1
Getting error 'module not found'
Learn Microsoft Fabric
skool.com/microsoft-fabric
Helping passionate analysts, data engineers, data scientists (& more) to advance their careers on the Microsoft Fabric platform.
Leaderboard (30-day)
powered by