calculix / CalculiX-Examples

CalculiX examples by Prof. Martin Kraska from Brandenburg University of Applied Sciences. Excellent starting point to master parametric modelling with CGX and CCX.
MIT License
308 stars 95 forks source link

Error running "run_all.py" #49

Closed oldninja closed 4 years ago

oldninja commented 4 years ago

Hello, Thank you Dr. Kraska for putting this repo together - it is a great resource! Also, thanks to @imirzov for the latest edits. I tried running the python script "run_all.py" but I get the following error, does anyone had this issue before? Or did I miss something from the - Setup page.

Traceback (most recent call last):
  File "run_all.py", line 225, in <module>
    auto.run()
  File "run_all.py", line 171, in run
    all_tests = self.scan(self.start_folder, 'test.py')
  File "run_all.py", line 116, in scan
    for f in os.scandir(start_folder):
FileNotFoundError: [Errno 2] No such file or directory: ''

Using cgx_2.15 & ccx_2.16, with Python 3.8.2 [GCC 9.3.0] on linux (Ubuntu 20.04).

Thanks in advance!

imirzov commented 4 years ago

Hello, Thanks for clear reporting.

I can add try/catch to the run_all.py but still it'll not work if you have broken symbolic links. Please, check you file structure. Try omit using symbolic links.

oldninja commented 4 years ago

Hi @imirzov, thanks for your help! I appreciate the fast reply. I didn't have any symbolic links in my file structure - to my knowledge. I simply cloned the repo and performed the instructions on the Setup page.

I tried the following solution on line 215: from this --> start_folder = os.path.dirname(__file__) to this --> start_folder = os.path.dirname(os.path.abspath(__file__)) and now works like a charm - see #50 . The idea came from this post. Not sure if this is a problem particular to Ubuntu on wsl2.

Thanks!