Issue with get_tables() method - files written to wrong location #507

Closed
opened 2026-02-16 00:18:04 -05:00 by yindo · 0 comments
Owner

Originally created by @leosmfk on GitHub (Jul 16, 2025).

Problem:
When using get_tables() with absolute paths, the extracted CSV files are being written to the root directory (/1.csv, /2.csv, etc.) instead of the specified download directory.

What I'm seeing:

import tempfile
from llama_cloud_services import LlamaParse

parser = LlamaParse(api_key="my_key", result_type="markdown")
json_result = parser.get_json_result("my_document.pdf")

# Using absolute path
temp_dir = tempfile.mkdtemp()  # e.g., 
"/var/folders/xyz/temp_abc123"
tables = parser.get_tables(json_result, temp_dir)

# Files end up in "/" instead of temp_dir
# Error: [Errno 30] Read-only file system: '/1.csv'

What works
Using relative paths works fine:
tables = parser.get_tables(json_result, "tables/")

Enviroment

  • Latest version of llama_cloud_services
  • macOS
  • Python 3.13
Originally created by @leosmfk on GitHub (Jul 16, 2025). **Problem:** When using get_tables() with absolute paths, the extracted CSV files are being written to the root directory (/1.csv, /2.csv, etc.) instead of the specified download directory. **What I'm seeing:** ``` import tempfile from llama_cloud_services import LlamaParse parser = LlamaParse(api_key="my_key", result_type="markdown") json_result = parser.get_json_result("my_document.pdf") # Using absolute path temp_dir = tempfile.mkdtemp() # e.g., "/var/folders/xyz/temp_abc123" tables = parser.get_tables(json_result, temp_dir) # Files end up in "/" instead of temp_dir # Error: [Errno 30] Read-only file system: '/1.csv' ``` **What works** Using relative paths works fine: `tables = parser.get_tables(json_result, "tables/")` **Enviroment** - Latest version of llama_cloud_services - macOS - Python 3.13
yindo added the bug label 2026-02-16 00:18:04 -05:00
yindo closed this issue 2026-02-16 00:18:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#507