Skip to content

[CCUT] Arpeggio package "NoMatch" exception thrown when given purely numerical input #16

@huerdong

Description

@huerdong

When ccut is given a purely numerical input for unit detection, the arpeggio package throws a "NoMatch" exception. The expected result should a unitless ("UNKNOWN DIMENSION") schema.

Example:

from ccut import ccut
cc = ccut()
cc.get_top_ccu("10")

throws this exception
arpeggio.NoMatch: Expected 'deg C' or '[a-zA-Z]+' or '$' or '€' or '₡' or '£' or '₪' or '₹' or '¥' or '₩' or '₦' or '₲' or '฿' or '₴' or '₫' at position (1, 3) => '10*'.

It appears to be assuming that we should always be providing a character in addition to the numerical value to the input.

Addendum:
Further testing shows that non-purely numerical inputs also throw this error, e.g. "OBJECTID_1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions