Opened 5 years ago

Closed 5 years ago

#2269 closed defect (fixed)

Rasdapy3 Update with file

Reported by: apercov Owned by: apercov
Priority: major Milestone: 10.0
Component: rasdapy Version: 9.8
Keywords: Cc: Dimitar Misev
Complexity: Medium

Description

When we try to update a collection with file's data using rasdapy3, rasdapy3 throws error:

/home/apercov/rasdaman/systemtest/testcases_mandatory/test_rasdapy3/rasql.py --server localhost --port 7001 --user rasadmin --passwd rasadmin --database /opt/rasdaman/data/RASBASE -q 'update test_overlap set test_overlap[256:511,211:421] assign shift(decode($1 ),[256,211])' -f /home/apercov/rasdaman/systemtest/testcases_mandatory/test_rasdapy3/testdata/mr_1.png
rasql done.
Traceback (most recent call last):
  File "/home/apercov/rasdaman/systemtest/testcases_mandatory/test_rasdapy3/rasql.py", line 272, in <module>
    main.execute()
  File "/home/apercov/rasdaman/systemtest/testcases_mandatory/test_rasdapy3/rasql.py", line 145, in execute
    self.validator.mdddomain, self.validator.mddtype)
  File "/home/apercov/rasdaman/applications/rasdapy3/rasdapy/query_executor.py", line 127, in execute_update_from_file
    return self.execute_update(query, gmarray)
  File "/home/apercov/rasdaman/applications/rasdapy3/rasdapy/query_executor.py", line 71, in execute_update
    query_result = self.ras_oqlquery.execute()
  File "/home/apercov/rasdaman/applications/rasdapy3/rasdapy/ras_oqlquery.py", line 135, in execute
    res = query.execute_write_with_file()
  File "/home/apercov/rasdaman/applications/rasdapy3/rasdapy/cores/core.py", line 435, in execute_write_with_file
    qr.from_streamed_response(exec_update_query_from_file_resp)
  File "/home/apercov/rasdaman/applications/rasdapy3/rasdapy/query_result.py", line 37, in from_streamed_response
    self.endianness = barray[1]
IndexError: bytearray index out of range

To reproduce the error:

PATH_TO_RASQL_RASDAPY3 --server localhost --port 7001 --user rasadmin --passwd rasadmin --database /opt/rasdaman/data/RASBASE -q 'update test_overlap set test_overlap[256:511,211:421] assign shift(decode($1 ),[256,211])' -f /home/apercov/rasdaman/systemtest/testcases_mandatory/test_rasdapy3/testdata/mr_1.png

Change History (4)

comment:1 by apercov, 5 years ago

Cc: Dimitar Misev added

comment:2 by Dimitar Misev, 5 years ago

Owner: set to dkamov
Status: newassigned

comment:3 by Dimitar Misev, 5 years ago

Owner: changed from dkamov to apercov

comment:4 by Dimitar Misev, 5 years ago

Resolution: fixed
Status: assignedclosed

I think it was fixed.

Note: See TracTickets for help on using tickets.