Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors running example 1 #39

Open
duhd1993 opened this issue Jun 8, 2022 · 2 comments
Open

errors running example 1 #39

duhd1993 opened this issue Jun 8, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@duhd1993
Copy link
Contributor

duhd1993 commented Jun 8, 2022

The error happens at https://github.itap.purdue.edu/wenbinyugroup/msg_design/blob/1841bdd0493506f039d578f8646ffdd7cd530db8/scripts/msgd/da/design_analysis.py#L347-L349

I believe it's because the data_proc_funcs cannot be imported successfully. You can manually append current path to sys.path.
The search path is the path to the file of design_analysis.py which does not contain data_proc_funcs

@duhd1993 duhd1993 added the bug Something isn't working label Jun 8, 2022
@unitasium
Copy link
Contributor

By default python will add the current directory (e.g., example/evals/eval.1) to its search path.
Can you post the detailed error message?

@duhd1993
Copy link
Contributor Author

duhd1993 commented Jun 9, 2022

It searches in e1 folder, but data_proc_funcs is not in e1 folder.

INFO     | 2022-06-09 14:12:59 | design_analysis.preprocess | import data_proc_funcs as user_mod
INFO     | 2022-06-09 14:12:59 | design_analysis.preprocess | from data_proc_funcs import materialId2Name
something wrong when importing module: data_proc_funcs
INFO     | 2022-06-09 14:12:59 | dakota.writeOutput | writing output files...
INFO     | 2022-06-09 14:12:59 | dakota.writeOutput | eval 147 failed
Traceback (most recent call last):
  File "/home/roger/a/du135/ivabs/scripts/msgd/ivabs.py", line 184, in runDakotaEval
    dda.analysis()
  File "/home/roger/a/du135/ivabs/scripts/msgd/da/dakota.py", line 605, in analysis
    design_analysis.run()
  File "/home/roger/a/du135/ivabs/scripts/msgd/da/cs.py", line 56, in run
    self.preprocess()
  File "/home/roger/a/du135/ivabs/scripts/msgd/da/design_analysis.py", line 361, in preprocess
    func_obj(self.data, self.sname, self.logger, *args, **kwargs)
UnboundLocalError: local variable 'func_obj' referenced before assignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants