Hi, I am trying to set the INPUT_DIR and OUTPUT_DIR locally
Followed up all steps on: https://docs.losant.com/notebooks/notebook-file/writing-guide/
Reached: "Since we will be running locally, after you receive your data export, save it to your local inputs directory . In my file structure above, I would place data.csv in ~/src/analytics/inputs"
I am running Jupyter Notebook from the anaconda prompt (installed anaconda as recommended)
The exported file was moved to `~/src/analytics/inputs which was created in the .Jupyter directory.
Please explain were the following recommendation take place:
$ cd ~/src/analytics # go to my project folder
set input and output env vars when running jupyter
The windows comand prompt or Anaconda command Prompt does not accept:
INPUT_DIR=~/src/analytics/inputs OUTPUT_DIR=~/src/analytics/outputs jupyter notebook
Not sure were to run the below command when running jupyter notebook:
INPUT_DIR=(pwd) OUTPUT_DIR=(pwd) jupyter-notebook
As a result of the above, I can not seem to set up my os.environ to show the path to: OUTPUT_DIR or INPUT_DIR
Tried running the Python 3 under jupyter with:
import os
print(os.environ[âINOUT_DIRâ])
print(os.environ[âOUTOUT_DIRâ])
am not getting the directories showing up
Tried the âDebugging Losant Notebooksâ notebook from May 7th by anaptfox and got the same result of no directory path on os.environ
Please assist and direct me how to set up the local INPUT/OUTPUT directories as I launch jupyter notbook
Then, you can edit the line input_dir = os.getcwd() + '/input' to manually set the path when the environment variable does not exist. So, locally, you can manually set, but once running in Losant the environment variables will work properly.
From what it looks like, your paths are correct. However, if youâre still getting a âFile Not Foundâ error, it means your Local Notebook canât find the file. There is not much help I can provide on my end to debug this.
From here, I would create a simple notebook to ensure that I can simply read a file. Something like this: