Python Error - Dynamo not finding python module

I’m trying to parse a CSV file to write to parameters in Revit.
The data is sort of badly formatted by the program that outputs it, so i’m trying to clean it in python.

The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
import csv

with open(dataEnteringNode,‘rb’) as f:
reader = csv.reader(f)
li = list(reader)

new=[]

for ele in li:
if ele[1]==‘Room’:
new.append(ele)

Assign your output to the OUT variable.
OUT = new

When i run the script, i get the following error

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 3, in
ImportError: No module named csv

the csv module works in the python shell, so how do i tell dynamo to access the csv module?

also, are there code tags that i’m missing?

Hi @OrangeOcelot

You have to add library path.

2 Likes

2 posts were split to a new topic: Python3 Error - Dynamo not finding python module