Skip to content

Query for a ListingId that includes a "-" (dash character) using search(search_filter={}) #223

Description

@theodorebear

Hi all! Love this library and only ran into one snag so far.

While searching a Listing resource, Listing class, supplying a dict to search_filter, and the field I want to match on is "V0-215012678", which is in CRMLS (Southern California).

When running with a dict {'ListingId': 'V0-215012678'}, I get the following:

Traceback (most recent call last): File "/Users/theodorebear/Documents/closehack-mls/lib/mls.py", line 1672, in request for i,result in enumerate(results): File "/Users/theodorebear/.pyenv/versions/3.6.11/lib/python3.6/site-packages/rets/session.py", line 417, in search for res in search_cursor.generator(response=response): File "/Users/theodorebear/.pyenv/versions/3.6.11/lib/python3.6/site-packages/rets/parsers/search.py", line 52, in generator raise RETSException(msg) **rets.exceptions.RETSException: RETS Error 20206: Could not parse DMQL2 Query: Invalid character: ' at or near position 11. [...ListingId= !-->'V0-2150126]**

Converting to dmql_query='(ListingId="V0-215012678")' seemed to do the trick for me since it was a DMQL query with the item wrapped in quotes.

If this package was able to convert the single quotes in the {'ListingId': 'V0-215012678'} to double quotes, then I could stick with the search_filter={} dict method of searching, but for now I think I'll have to bypass that completely and convert all queries to DMQL.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions