Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to append to a non-existant Parquet file throwing incorrect error #1295

Closed
joshmarshall1 opened this issue Apr 18, 2022 · 0 comments · Fixed by #1296
Closed

Attempting to append to a non-existant Parquet file throwing incorrect error #1295

joshmarshall1 opened this issue Apr 18, 2022 · 0 comments · Fixed by #1296
Assignees
Labels
bug Something isn't working In Progress Work on ticket is in progress / ticket is actively being worked

Comments

@joshmarshall1
Copy link
Contributor

joshmarshall1 commented Apr 18, 2022

Found while testing #1229 and determined to be pre-existing.

When attempting to append to a non-existant file and error message of Cannot append a non-existent file, please save without mode='append' is expected. Instead, only for pdarrays being saved to parquet format, an error of Invalid argument: Argument type mismatch in argument 0 (in string.format) is being thrown.

To reproduce:

import arkouda as ak
ak.connect()
a = ak.arange(25)
#Will only error if there is no _LOCALE0000.parquet file in the directory
a.save_parquet("/home/josh/testing/", "1229_pdarray", "append")

This results in:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Input In [4], in <cell line: 1>()
----> 1 a.save_parquet("/home/josh/testing/", "1229_pdarray", "append")

File ~/anaconda3/envs/test-env/lib/python3.8/site-packages/typeguard/__init__.py:1015, in typechecked.<locals>.wrapper(*args, **kwargs)
   1013 memo = _CallMemo(python_func, _localns, args=args, kwargs=kwargs)
   1014 check_argument_types(memo)
-> 1015 retval = func(*args, **kwargs)
   1016 try:
   1017     check_return_type(retval, memo)

File ~/git/arkouda/arkouda/pdarrayclass.py:1159, in pdarray.save_parquet(self, prefix_path, dataset, mode, compressed)
   1157 except Exception as e:
   1158     raise ValueError(e)
-> 1159 return cast(str, generic_msg(cmd="writeParquet", args="{} {} {} {} {} {}".\
   1160                              format(self.name, dataset, m, json_array, self.dtype,
   1161                                     compressed)))

File ~/git/arkouda/arkouda/client.py:548, in generic_msg(cmd, args, payload, send_binary, recv_binary)
    546     else:
    547         assert payload is None
--> 548         return _send_string_message(cmd=cmd, args=args, recv_binary=recv_binary)
    550 except KeyboardInterrupt as e:
    551     # if the user interrupts during command execution, the socket gets out
    552     # of sync reset the socket before raising the interrupt exception
    553     socket = context.socket(zmq.REQ)

File ~/git/arkouda/arkouda/client.py:351, in _send_string_message(cmd, recv_binary, args)
    349 # raise errors or warnings sent back from the server
    350 if return_message.msgType == MessageType.ERROR:
--> 351     raise RuntimeError(return_message.msg)
    352 elif return_message.msgType == MessageType.WARNING:
    353     warnings.warn(return_message.msg)

RuntimeError: Invalid argument: Argument type mismatch in argument 0 (in string.format)
@joshmarshall1 joshmarshall1 added bug Something isn't working In Progress Work on ticket is in progress / ticket is actively being worked labels Apr 18, 2022
@joshmarshall1 joshmarshall1 self-assigned this Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working In Progress Work on ticket is in progress / ticket is actively being worked
Projects
None yet
1 participant