Thanks to visit codestin.com
Credit goes to github.com

Skip to content

🐞 'ExaHttpThread' object has no attribute 'terminate_export' #183

@rbu1

Description

@rbu1

Summary

In the class ExaHTTPTransportWrapper in the function export_to_callback in the except block the function terminate_export of an object of type ExaHttpThread is called. But this function does not exist.

Reproducing the Issue

Reproducibility: always

This bug occured in a framework that incorporated PyExasol to load data from multiple tables from Exasol. In case there is an error in the connection (for e.g. a network issue), this bug can be reproduced.

Due to its nature (there must be an error in the data transfer or network) it's a bit difficult to reproduce the bug stand alone. I didn't prepare a MWE.

Expected Behaviour

The correct function (terminate) to terminate a ExaHttpThread is called.

Actual Behaviour

The function terminate_export (and terminate_import) are called but do not exist.

Root Cause (optional)

Function call to terminate_export is implemented here: http_transport.py#L374)

However, this function does not exist. The correct function to be called is called terminate, defined here: http_transport.py#L292

Probably, the same holds for the function call terminate_import, implemented here: http_transport.py#L413

Context

The function terminate_export was added with this commit: Improve exception handling and pipe close order for HTTP transport th… · exasol/pyexasol@94114ec · GitHub

And then removed with a following commit: Use context manager for pipes while calling HTTP transport callback, … · exasol/pyexasol@e12c36f · GitHub

In this commit, the two functions terminate_export and terminate_import were combined to terminate. But the function call was not changed accordingly.

System

  • PyExasol version 0.26.0

Metadata

Metadata

Assignees

Labels

bugUnwanted / harmful behavior

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions