0
I have a web2py framework project called ucsalPY with an Aplication called ucsal.
The path of application is:
ucsalPY/application/ucsal (/controllers, /models, /views)
In the default.py controller I created the method:
nomes={"nome": ['Pedro', 'Tiago', 'Joao']}
index():
return nomes
and in the index.html view I read {{=nomes}}
, in this way works.
I tried to import the pandas to read the csv file and return to index, but the browser shows Internal error when I open localhost:8000/ucsal/default/index
.
I inserted the line import pandas as pd
or in the model or controller and only this line gives the error.
How do I show data from any source (db or file) in a view? I don’t 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 mistake when I import pandas nomodel is:
at 0x0000000004C4A270, file "C: Users USUARIO workspacePython ucsalPI Applications ucsal models db.py", line 7>
When I care about the controller, it’s:
at 0x0000000009C02810, file "C: Users USUARIO workspacePython ucsalPI Applications ucsal controllers/default.py", line 6>
What is the error you are referring to? You have pandas installed in the python you are using?
– Marlysson
@Marlysson edited the question and put more details.
– André Nascimento