sassoftware / sassoftware/python-swat

Failed to access file /cascache/cascache/

Open
#151 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
159
Forks
65
PR merge metrics
No merged PRs in 30d

Description

Hi Team,

I attempted to utilize the swat package to push a pandas dataframe as a Sas table to a Sas server, but I encountered an error message that states "Failed to access cache file." Below is the code that I am executing for your reference. I would highly appreciate your assistance.

Code:

Verify file existence at a designated path

if not os.path.exists(castable_path):
raise ValueError("Unable to locate CASTable at the specified path.")

Transfer CASTable to SAS server

try:
conn.loadactionset("table")
conn.upload(castable_path, casout=dict(name="mytable_1", replace=True, caslib='CASUSER(sasboot)'))
print("CASTable successfully uploaded!")
except swat.CASActionError as e:
print(f"An error occurred while uploading CASTable: {e}")

Please note that I received the following output while running the code:

NOTE: Added action set 'table'.
CASTable uploaded successfully!

ERROR: Failed to access file /cascache/cascache/_f_1e7ad78a_7f7b9bcc1b68.sashdat.
ERROR: The action stopped due to errors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported conn.upload call with the supplied CASTable path and CASUSER(sasboot) destination, then compare the successful upload message with the later CASActionError for the /cascache/cascache file. Done means identifying whether the failure is in the Python client or the SAS server environment and recording a confirmed fix or guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
backend-api-design, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.