Skip to content

TypeError: isoformat() takes no arguments (1 given)#8

Open
pawl wants to merge 1 commit into
ox-it:masterfrom
pawl:patch-2
Open

TypeError: isoformat() takes no arguments (1 given)#8
pawl wants to merge 1 commit into
ox-it:masterfrom
pawl:patch-2

Conversation

@pawl

@pawl pawl commented Oct 4, 2013

Copy link
Copy Markdown

I was getting the following error because of that line:
TypeError: isoformat() takes no arguments (1 given)

I was getting the following error because of that line:
TypeError: isoformat() takes no arguments (1 given)
@pawl

pawl commented Oct 7, 2013

Copy link
Copy Markdown
Author

Using datetime worked, I converted my date object to datetime using: datetime.datetime.combine(, datetime.time(0))

Yeah, it should probably be cleverer and handle date objects.

Would line 282 in types.py look like this?:

def _unparse(self, value):
    if value is datetime.date:
        return value.isoformat()
    if value is datetime.date:
        return value.isoformat(' ')
    else:
        return value.isoformat(' ') # or maybe an error message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants