I have a web2py framework project called ucsalPY with an application called ucsal.
The application path is:
ucsalPY/application/ucsal (/controllers, /models, /views)
In the default.py controller I created the method:
nomes={"nome": ['Pedro', 'Tiago', 'Joao']}
index():
return nomes
In view index.html I read {{=nomes}}
, this way it works.
I tried to import the pandas to read the csv file and to return in the index, but the browser shows internal error when I open localhost:8000/ucsal/default/index
.
I inserted the line import pandas as pd
either in the model or the controller and only this line already gives the error.
How do I display data from any source (db or file) in a view? I do not know if I have to put anything in the models. Just remembering that I have the db.py and menu.py files in ucsal / models.
The error when I import pandods nomodel is:
At 0x0000000004C4A270, file "C: \ Users \ USER \ workspacePython \ ucsalPI \ applications \ ucsal \ models \ db.py", line 7 >
Now when I import into the controller it is:
At 0x0000000009C02810, file "C: \ Users \ USER \ workspacePython \ ucsalPI \ applications \ ucsal \ controllers / default.py", line 6>