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

AttributeError: 'Variables' object has no attribute 'create_output_dict' #585

Open
btthorn1 opened this issue Dec 16, 2022 · 4 comments
Open

Comments

@btthorn1
Copy link

Hi, I have been attempting to run the "Effective Stiffness of Fiber Composite" introductory notebook and I continue to encounter an error when running the below cell:

y_stress = solve_fe(x_data,
elastic_modulus=(1.3, 2.5),
poissons_ratio=(0.42, 0.35),
macro_strain=0.001)['stress'][..., 0].persist()

The error is:

~\anaconda3\lib\site-packages\pymks\fmks\data\elastic_fe.py in get_displacement(vec, shape)
751 """
752 return pipe(
--> 753 vec.create_output_dict()["u"].data,
754 lambda x: np.reshape(x, (tuple(x + 1 for x in shape) + x.shape[-1:])),
755 )

AttributeError: 'Variables' object has no attribute 'create_output_dict'

Any help that can be offered would be much appreciated!

@wd15
Copy link
Contributor

wd15 commented Dec 19, 2022

Could you perhaps list out the packages and versions in your environment? pip freeze helps with this if you're using pip or conda list if you're using Conda. It's likely that your version of PyMKS and Sfepy are incompatible. However, if you have the versions I can reconstruct the environment and either provide a work around or let you know how to modify your environment to get things working. Also, could be a bug with a new release of Sfepy that we haven't got to yet, but good to see the versions before I assume anything.

@btthorn1
Copy link
Author

The versions of the packages are PyMKS-0.4.1 and Sfepy-2022.3+git.e3b638fb. I am working in a conda environment currently.

@btthorn1
Copy link
Author

I have a Windows OS as well

@wd15
Copy link
Contributor

wd15 commented Dec 20, 2022

@btthorn1, it looks like we haven't tested PyMKS with version 2022.3 of Sfepy. PyMKS works for sure with version 2022.1. Unfortunately, it looks like the Sfepy API has changed between 2022.1 and 2022.3. Try and revert you Sfepy to 2022.1 and you should be good. I filed this as a bug, so hopefully will be fixed reasonably quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants