how can make a path for yade to load python files

Asked by Alireza Sadeghi

Hello,

I am new user of YADE. I can't load any python files in the yade. when I write the file (for example: yade Hello.py) it shows me an error like this:

Welcome to Yade 2016-05-04.git-040f642
TCP python prompt on localhost:9000, auth cookie `uaydks'
XMLRPC info provider on http://localhost:21000
Running script Hello.py
Traceback (most recent call last):
  File "/usr/bin/yade", line 182, in runScript
    execfile(script,globals())
IOError: [Errno 2] No such file or directory: 'Hello.py'
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]

Could you please help me?I don't know what should I do :(

Thanks a lot

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Stránský (honzik) said :
#1

Hi Alireza,

> I am new user of YADE

welcome :-)

the error says, that Python does not know about Hello.py file. There are a few possible reasons
1) the actual file could be named differently, hello.py (linux is case sensitive)
2) in the terminal, you are in different location than you saved Hello.py file. So e.g. if you save your hallo.py in e.g. Documents/yade, you should write in terminal
cd Documents/yade
and then yade Hello.py

let us know if it helped

cheers
Jan

Revision history for this message
Alireza Sadeghi (asadeghime) said :
#2

Dear Jan,

Thank you very much for your help. It was about the folder that my program was in it. it was solved. Thanks a lot.

Best Regards

Alireza

Revision history for this message
Alireza Sadeghi (asadeghime) said :
#3

Thanks Jan Stránský, that solved my question.