我在 heroku 中部署的 django 應用程式設法顯示上傳檔案表單。但是,一旦我嘗試上傳 Excel xlsx 檔案,它就會顯示
UnknownParameters at /
Please check if there were typos in function parameters: {'model': None, 'initializer': None, 'mapdict': None}.
Otherwise unrecognized parameters were given.
以下安裝設定已為 django-excel 完成
要求.txt
pyinstaller
django-excel
pyexcel-xls
pyexcel-xlsx
pyexcel-ods
我確定我的models.py已連接并且與 mapdict 引數正確匹配
我見過類似的問題Why pyexcel throws exception "UnknownParameters: Please check if there are Typs in function parameters"?我嘗試安裝 pyinstaller 以及隱藏的匯入
--hidden-import pyexcel_xls
--hidden-import pyexcel_xls.xlsr
--hidden-import pyexcel_xls.xlsw
但不幸的是它仍然不適用于我的應用程式
我想知道是否有任何線索可以解決這個問題,讓我在 heroku 上運行我的 django Web 應用程式?或者任何關于隱藏匯入在 heroku web 應用程式中運行的建議或學習?
uj5u.com熱心網友回復:
我建議在 pythonanywhere.com 中托管您的 django 應用程式
通過一些搜索,我發現人們在部署 heroku 時遇到了用于 excel 檔案的庫的問題,可能 heroku 不支持 pyexcel。
這是有關如何在 pythonanywhere https://www.youtube.com/watch?v=Y4c4ickks2A 中部署您的應用程式的教程
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/351682.html
