TypeError: 'default' is an invalid keyword argument for this function
See original GitHub issue- OS: Linux Centos 7.4 / macOS 10.13.2
- Version: Python 3.6
- Traceback:
>>> row.first() Traceback (most recent call last): File "<input>", line 1, in <module> row.first() File "/home/zhanglei/.local/lib/python3.6/site-packages/records.py", line 45, in __repr__ return '<Record {}>'.format(self.export('json')[1:-1]) File "/home/zhanglei/.local/lib/python3.6/site-packages/records.py", line 96, in export return self.dataset.export(format, **kwargs) File "/home/zhanglei/.local/lib/python3.6/site-packages/tablib/core.py", line 467, in export return export_set(self, **kwargs) File "/home/zhanglei/.local/lib/python3.6/site-packages/tablib/formats/_json.py", line 30, in export_set return json.dumps(dataset.dict, default=date_handler) TypeError: 'default' is an invalid keyword argument for this function
Does anyone know why this error happened? Even if the dataset doesn’t contains the date format.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10
Top Results From Across the Web
XYZ is an invalid keyword argument for this function
python - XYZ is an invalid keyword argument for this function - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing ......
Read more >Debbie can't compile GDAL Master (GDAL 3.3) - OSGeo Trac
... TypeError: 'encoding' is an invalid keyword argument for this ... debbie does have python and python3 installed, but tried to make it...
Read more >Functions — Introduction to Programming with Python
For example, we have often used the input() function to allow users of our program to type ... TypeError: 'x' is an invalid...
Read more >invalid keyword argument for this function - Google Groups
Exception Type: TypeError at /event/createevent/ Exception Value: 'event_public' is an invalid keyword argument for this function
Read more >TypeError: 'X' is an invalid keyword argument for print()
The "TypeError: 'X' is an invalid keyword argument for print()" occurs when we pass an invalid keyword argument to the print() function. To ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@raulmonge the https://github.com/kennethreitz/tablib/issues/297 describes the cause and has workaround (patching json lib in tablib.format.json).
Either use that trick or uninstall
ujson
and it shall work.This issue will have to be fixed in tablib probably.