Pegase745 / sqlalchemy-datatables

SQLAlchemy integration of jQuery DataTables >= 1.10.x (Pyramid and Flask examples)
MIT License
159 stars 67 forks source link

TypeError: int() argument must be a string or a number, not 'list' - line 245 #74

Closed dremdem closed 7 years ago

dremdem commented 7 years ago

Hi,

I dowloaded latest version 1.1.0 and got the error when render the table:

File "/home/vagrant/pycharm_proj/arp_norm/venv/lib/python2.7/site-packages/datatables/init.py", line 245, in output_result output['draw'] = str(int(self.params['draw'])) TypeError: int() argument must be a string or a number, not 'list'

tdamsma commented 7 years ago

Could it be the draw parameter is in the url query more than once?

grakic commented 7 years ago

If using Flask, you need to pass parameters as request.args.to_dict(). This library is using dict() on it, and with Werkzeug's MultiDict this creates a dictionary with lists, not elements.