graphsense / graphsense-REST

A REST service for accessing cryptocurrency data stored in Apache Cassandra.
MIT License
10 stars 8 forks source link

Bulk Interface | Report error when parameter missing #60

Closed behas closed 2 years ago

behas commented 2 years ago

Example:

with graphsense.ApiClient(configuration) as api_client:
    try:
        api_instance = bulk_api.BulkApi(api_client)

        operation = "list_tags_by_entity"
        body = {"entity": [653389348,853107808]}

        df_entity_tags = pd.read_csv(api_instance.bulk_csv(CURRENCY, operation, body=body,
                                                           num_pages=1, _preload_content=False))

    except graphsense.ApiException as e:
        print("Exception when calling Entities Api: %s\n" % e)

raises ValueError: invalid literal for int() with base 16: b'HTTP/1.1 500 Internal Server Error\r\n'

myrho commented 2 years ago

parameter level is missing. Unfortunately this is not reported back. Try:

body = {"entity": [653389348,853107808], "level": "entity"}
behas commented 2 years ago

I still get an error, most likely because there aren’t any tags for these entities.

EmptyDataError: No columns to parse from file

On 19.01.2022, at 10:41, Matthias @.***> wrote:

parameter level is missing. Unfortunately this is not reported back. Try:

body = {"entity": [653389348,853107808], "level": "entity"}

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.


BERNHARD HASLHOFER Senior Scientist & Thematic Coordinator Data Science & Artificial Intelligence Center for Digital Safety & Security

AIT Austrian Institute of Technology GmbH Giefinggasse 4 | 1210 Vienna | Austria T +43 50550-4192 | M +43 664 88390692 @.*** | www.ait.ac.at

My research profile: http://bernhardhaslhofer.info/

FN: 115980 i HG Wien | UID: ATU14703506 www.ait.ac.at/Email-Disclaimer

myrho commented 2 years ago

exactly

behas commented 2 years ago

Is it possible to somehow change this behavior to a non-exception throwing mode? E.g., return a dataframe with passed entity keys and None in the tags column?

Bernhard

On 19.01.2022, at 13:08, Matthias @.***> wrote:

exactly

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.


BERNHARD HASLHOFER Senior Scientist & Thematic Coordinator Data Science & Artificial Intelligence Center for Digital Safety & Security

AIT Austrian Institute of Technology GmbH Giefinggasse 4 | 1210 Vienna | Austria T +43 50550-4192 | M +43 664 88390692 @.*** | www.ait.ac.at

My research profile: http://bernhardhaslhofer.info/

FN: 115980 i HG Wien | UID: ATU14703506 www.ait.ac.at/Email-Disclaimer

myrho commented 2 years ago

+ return error message column

myrho commented 2 years ago

this is done already