Open ninja7v opened 3 years ago
Hi,
What is in your folder "C:\Users\LPT14\Anaconda3\envs\py27\lib\site-packages\topology_optimization-0.4.0-py2.7.egg\topy\data\"?
Thanks for your fast answer, here is the inside of the folder: 04/06/2021 03:32 PM
From: William Hunter @.> Sent: Tuesday, April 6, 2021 16:12 To: williamhunter/topy @.> Cc: Luc @.>; Author @.> Subject: Re: [williamhunter/topy] execution error (#51)
Hi,
What is in your folder "C:\Users\LPT14\Anaconda3\envs\py27\lib\site-packages\topology_optimization-0.4.0-py2.7.egg\topy\data"?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/williamhunter/topy/issues/51#issuecomment-814153835, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMNEGJHZ7GFIWXX6ATGUBF3THMJEVANCNFSM42O2ADAA.
You can see that you don't have the Q4bar.K file.
What version of Python are you using?
What version of Topy did you install?
I picked Topy-master and Topy-0.4.1 but I get the error on both. I am using Python 2.7.18 on a virtual environment with Conda.
Did you follow the instructions on this page? https://github.com/williamhunter/topy/releases/tag/0.4.1
On Tue, 6 Apr 2021 at 16:29, Luc @.***> wrote:
I picked Topy-master and Topy-0.4.1 but I get the error on both. I am using Python 2.7.18 on a virtual environment with Conda.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/williamhunter/topy/issues/51#issuecomment-814167463, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMS2UIOD2CRF7EH4P5NILDTHMLFVANCNFSM42O2ADAA .
Yes I did.
Hmmm. I haven't looked at this in a few years. Give me some time and I'll investigate
Sure. Thanks a lot for your commitment.
Just in case, here is the full output after I submitted the command:
It seems as though all or some of the element stiffness matrices
do not exist. Creating them...
This is usually only required once and may take a few minutes.
SymPy is integrating: K for Q4bar...
Created C:\Users\LPT14\Anaconda3\envs\py27\lib\site-packages\topology.K (stiffness matrix).
Traceback (most recent call last):
File ".\optimise.py", line 8, in
Hello, my problem
PS C:\users\admin\Documents\topy\scripts> python optimise.py inverter_3d_etaopt_gsf_dquad.tpd
Traceback (most recent call last):
File "optimise.py", line 8, in
PS C:\users\admin\Documents\topy\scripts> pip list Package Version
backports.functools-lru-cache 1.6.4 cycler 0.10.0 kiwisolver 1.1.0 matplotlib 2.2.5 mpmath 1.2.1 numpy 1.16.6+mkl pip 19.2.3 pyparsing 2.4.7 pysparse 1.3 python-dateutil 2.8.1 pytz 2021.1 PyVTK 0.5.18 setuptools 44.1.1 six 1.16.0 sympy 1.5.1 ToPy 0.3.2
In my case, the problem came from np.load in elements.py. I solved this problem by modifying the load function in elements.py
file, which is change load(fname) to load(fname, allow_pickle=True). In this way, it can successfully load the stiffness file.
allow_pickle=True
didn't work
Found a way, basically you need the missing .K "stiffness matrix" files. For some reason they are not generated during setup.py installation. I got them generated and I'm hosting them on my site sasserisop.com/topyKFiles.zip There is 7 of them you will need. Place these files under C:\Users\YOURUSERNAME\anaconda3\envs\py27\Lib\site-packages\topology_optimization-0.4.0-py2.7.egg\topy\data There is one more thing I had to do before I got it to work and that is to allow_pickle=True like shushu-qin mentioned, to do this: under the same directory with the .K files, go back up one directory and you will find elements.py From there, edit it with your text editor and change every instance of load(fname) to load(fname, allow_pickle=True). Now to test, open a terminal under the py27 environment you created, (this is assuming you went through the installation steps in github.com/williamhunter/topy/releases/tag/0.4.1). Now cd to the optimise.py file, in my case, type: cd C:\Users\YOURUSERNAME\Desktop\topy-0.4.1\scripts Now type: python .\optimise.py ../examples/mbb_beam/beam_2d_reci_10_iters.tpd If everything above was done correctly this will generate 10 iterations for the given tpd file and spit out the results in the same directory optimise.py is in. Hooray! Now all we need is a new fixed release for the masses. I might add a pull request :)
I installed ToPy successfully on Windows, but when I try to execute it with the example "python .\optimise.py .\beam_2d_reci_10_iters.tpd" I keep having the error : IOError: [Errno 2] No such file or directory: 'C:\Users\LPT14\Anaconda3\envs\py27\lib\site-packages\topology_optimization-0.4.0-py2.7.egg\topy\data\Q4bar.K' I tried on 2 computers and I have the problem on both. Did I do anything wrong? Thanks for your help.