Home > Back-end >  django-excel pyexcel show unknown parameters for django heroku
django-excel pyexcel show unknown parameters for django heroku

Time:11-07

My django app deployed in heroku managed to show upload file form. However once I try uploading Excel xlsx file, it shows

UnknownParameters at /
Please check if there were typos in function parameters: {'model': None, 'initializer': None, 'mapdict': None}. 
Otherwise unrecognized parameters were given.

Following installation setup has done for django-excel

requirements.txt

pyinstaller
django-excel
pyexcel-xls
pyexcel-xlsx
pyexcel-ods

I am sure that my models.py is connected and along with the mapdict parameters matches correctly

I've seen similar issue Why pyexcel throws exception "UnknownParameters: Please check if there were typos in function parameters"? and I tried installing pyinstaller along with hidden imports

--hidden-import pyexcel_xls
--hidden-import pyexcel_xls.xlsr
--hidden-import pyexcel_xls.xlsw

but unfortunately it still doesn't work for my app

I wonder if there is any clue to solve this for me to run my django web application on heroku? or any advice or learning for hidden-import to run within heroku web app?

CodePudding user response:

I recommend hosting your django app in pythonanywhere.com

With a little bit of search I found that people is having problem with the library you are using for excel files when deploying in heroku, maybe heroku can't support pyexcel.

Here is a tutorial of how to deploy your app in pythonanywhere https://www.youtube.com/watch?v=Y4c4ickks2A

  • Related