question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 6 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
vlcinskycommented, Apr 30, 2018

@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.

0reactions
vlcinskycommented, Apr 30, 2018

This issue will have to be fixed in tablib probably.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found