Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
tomassa
Contributor
Contributor

"error": "Call to a member function getPath() on array"

Hello, I'm attempting to automate the process of exporting a table from a spreadsheet of a specific App, into either JSON or Excel format. I'm using the Get Straight Table Data (JSON Format).

Everything works correctly until the step of sending it via email. When I attach the output table to the attachments in the email sending block, it gives me this error:

"error": "Call to a member function getPath() on array".

Can someone please assist me with this issue? Or maybe give me another alternative to reach the same goal.

tomassa_0-1710861064230.png

Thanks in advanced. 

Labels (2)
1 Solution

Accepted Solutions
Shai_E
Support
Support

Hi @tomassa 

That Attachment input only accepts files, you can see it if you hover you mouse over the file icon some help text will appear saying it.

Two options:

1. add it to the body as text (JSON string)

2. a bit more complicated, from the response of get straight table data create/build a variable that holds a string representation of an html table, and then feed that to the email body as html option.

This way you will get your data shown as in a table

Best Regards

View solution in original post

3 Replies
Shai_E
Support
Support

Hi @tomassa 

That Attachment input only accepts files, you can see it if you hover you mouse over the file icon some help text will appear saying it.

Two options:

1. add it to the body as text (JSON string)

2. a bit more complicated, from the response of get straight table data create/build a variable that holds a string representation of an html table, and then feed that to the email body as html option.

This way you will get your data shown as in a table

Best Regards

tomassa
Contributor
Contributor
Author

Hi, @Shai_E 

Thanks for the support!

Best regards.

BawejaMedia
Contributor III
Contributor III

To resolve the "Call to a member function getPath() on array" error when attaching the output table to the email, you need to ensure that you're correctly handling the file attachment process. Here's a step-by-step solution to help you address the issue:

  1. Verify Data Format: Confirm that the output table data is properly formatted in either JSON or Excel format, depending on your requirement. Ensure that the data structure is correct and compatible with the chosen format.

  2. Check Attachment Path: Double-check the path or file location you're specifying for the attachment in your email sending block. Ensure that the attachment path points to the correct file containing the output table data.

  3. Handle File Attachment: If you're working with an array of files, ensure that you're accessing the correct file within the array before attempting to attach it to the email. Verify that the attachment process is properly handling the file and not treating it as an array.

  4. Debugging: Add debugging statements or logging to your code to track the values of variables and identify where the error is occurring. Log the file paths, file contents, and any relevant data to help diagnose the issue.

  5. Review Documentation: Consult the documentation or resources provided by the tool or platform you're using for email sending and attachment handling. Look for any specific requirements or limitations related to attaching files to emails, and ensure that you're following the recommended practices.

  6. Alternative Approach: If you're unable to resolve the issue with attaching the output table directly, consider alternative approaches. For example, you could save the output table data to a temporary file on your system and then attach that file to the email. Alternatively, explore different email sending methods or APIs that better support your requirements. Also, check out baweja Media.