Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-fatal error "bad datetime conversion" messages #71

Closed
lsetiawan opened this issue Mar 7, 2017 · 4 comments
Closed

Non-fatal error "bad datetime conversion" messages #71

lsetiawan opened this issue Mar 7, 2017 · 4 comments
Labels

Comments

@lsetiawan
Copy link
Member

lsetiawan commented Mar 7, 2017

ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
ERROR:root:bad datetime conversion
@valentinedwv
Copy link
Member

valentinedwv commented Mar 7, 2017

Some dates are not converting.

Could make the error more detailed error message, and not fatal. If there is no conversion, it defaults to to NOW:
core1_1.py:731

        try:
            beginDateTime =  dateutil.parser.parse(beginDateTime)
            endDateTime =  dateutil.parser.parse(endDateTime)
        except Exception as inst:
              logging.error('bad datetime conversion')

        #TimeInterval
        if beginDateTime is None:
            beginDateTime = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S")
        if endDateTime is None:
            endDateTime = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S")

@emiliom
Copy link
Member

emiliom commented Mar 7, 2017

Thanks, @valentinedwv. We haven't looked into this; at this point we just wanted to capture the issue before we forget. Thanks for digging into it! Like @lsetiawan said, the error is not fatal.

@emiliom
Copy link
Member

emiliom commented Mar 7, 2017

@lsetiawan, I'm not sure why you added the section "Links to relevant WOFpy resources and documentation" on this issue. I don't think those links discuss anything specific to this issue. We may move that section out of WOFpyODM2LBRtest_installation_notes.md later on, but for now they're still there for reference.

Unless I've missed something, please go ahead and delete that section from your original issue text. Thanks. FYI, I'm going to rename the issue to make it more specific.

@emiliom emiliom changed the title Non-fatal error messages Non-fatal error "bad datetime conversion" messages Mar 7, 2017
@lsetiawan lsetiawan added the bug label Jun 13, 2017
@lsetiawan
Copy link
Member Author

As of the latest WOFpy (cf12e13) This is error is not there anymore. I'm closing unless it reappears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants