Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

ArrowParseWarning #476

Closed
TomStageDK opened this issue Aug 1, 2019 · 5 comments
Closed

ArrowParseWarning #476

TomStageDK opened this issue Aug 1, 2019 · 5 comments

Comments

@TomStageDK
Copy link

Hi All,

Having done a fresh installation today on a Ubuntu 16.04 (fully updated system), waited for a while to make sure that data would be in the DB (default sqlite), ran a simple query and gotr the below error, looking at the referenced github page given in the error they say that the error can be supressed, so my question is how / where should the ArrowParseWarning be suppressed?

Query:
cif --itype ipv4 --limit 5 --format table --tags scanner

Error / Warning:
/usr/local/lib/python2.7/dist-packages/arrow/factory.py:202: ArrowParseWarning: The .get() parsing method without a format string will parse more strictly in version 0.15.0.See arrow-py/arrow#612 for more details.
ArrowParseWarning,

If more data is needed let me know.
Cheers,
Tom

@JesseBowling
Copy link
Contributor

I also encountered this yesterday for the first time. I suspect use of arrow in this repo should be updated....

@JesseBowling
Copy link
Contributor

@JesseBowling
Copy link
Contributor

If disabling warnings:

Disable Warnings

To get rid of the ArrowParseWarning messages in 0.14.3 onwards, do the following:

import warnings
from arrow.factory import ArrowParseWarning

warnings.simplefilter("ignore", ArrowParseWarning)

also might be addressed with this + freezing the version of arrow. If code is going to be fixed and a format string must be provided, that will likely mean additional specification in docs/etc. :(

@wesyoung
Copy link
Member

wesyoung commented Aug 2, 2019

I’d just submit a PR that has a pinned version of the previous version of arrow w/o that warning... I did the same in verbose-robot today.. (v4)

@systemcatch
Copy link

Hey everyone, I'm one of the maintainers of arrow.

arrow 0.14.3+ have the ArrowParseWarning included. arrow has long standing bugs related to str parsing that we're attempting to fix in version 0.15.0 and some of these changes may cause breakages.

Looking at the 6 references provided by @JesseBowling I don't see anything that problematic.

  • If you can tell me the format expected for things like reporttime, lasttime, 'time_first' etc I can help with any problems, since this package seems to deal with sqlite you're likely ok.

  • There will need to be a change from;

if isinstance(timestamp, str):
            timestamp = arrow.get(timestamp).datetime

to

if isinstance(timestamp, str):
            timestamp = arrow.get(timestamp, "X").datetime

Version 0.15.0 will be released near the end of August, the warnings will be gone then.

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

No branches or pull requests

4 participants