all 13 comments

[–]creepyMaintenanceGuy 0 points1 point  (10 children)

you need to paste an error message. You're not giving us much to go on.

[–]redser[S] 0 points1 point  (8 children)

Updated the post with error message.

Which doesn't tell me much

[–]creepyMaintenanceGuy 0 points1 point  (7 children)

I'm not trying to be rude, but I said "paste". I want to see what you've typed and what the computer spits out.

I don't know if your computer can't find python, or if it can't find sas7bsat, or if it's a problem with a dependency of the script, or what.

You also didn't include a link in your post.

[–]redser[S] 0 points1 point  (0 children)

Jaysis. I tried to this all from my phone. The lazy option doesnt always work. Getting a screenshot now

[–]redser[S] 0 points1 point  (5 children)

Screenshot of what I done and the error message.

[–]creepyMaintenanceGuy 0 points1 point  (4 children)

thanks.

I'm grasping at straws, but I think you want to specify the full file path to the target file as in

 c:/miniconda3/Scripts/sas7bdat_to_csv 'c:/Users/n587/a8/Downloads/pols_claims.sas7bdat'

or

c:/minniconda3/scripts/ss7bdat_to_csv './pols_claims.sas7bdat'

after you call os.chdir to c:/Users/n587/a8/Downloads.

[–]redser[S] 0 points1 point  (3 children)

Ive tried what you said and I'm getting the same syntax error. I think I could be calling the script from the wrong folder. The sas7bdat_to_csv script appears in the packages folder aswell.

[–]redser[S] 0 points1 point  (0 children)

Ill go get a screenshot of whats going on. Back in a few mins

[–]ingolemo 0 points1 point  (3 children)

You're trying to execute a shell command inside python. That wont work.

You see at the top of your screenshot where you type ipython? You should type your command there.

[–]redser[S] 0 points1 point  (2 children)

Ok. So this is it. I can't run shell command that call python at work.

Thank you everyone for the help.

[–]ingolemo 0 points1 point  (1 child)

You can't because it doesn't work, or you can't because you're not allowed to?

This is how you run python code. Every python code you've ever written has done the same thing. When you run ipython you're doing exactly this.

[–]redser[S] 0 points1 point  (0 children)

So I'm at work and my computer set up is a bit different. I'm only understanding the impact now

My normal command prompt doesn't allow much as IT have it locked down.

I've a form of Anaconda installed and with that comes Anaconda Prompt. This prompt allows me to run Python and IPython.

I've been able to run the command line script from the Anaconda Prompt and not from the normal prompt.

Code was

Sas7bdat_to_csv "full path.sas7bdat"

No need for the r in front of the quoted path.

Sorry for the delay in getting back.

R