robbievanleeuwen / section-properties

Analysis of an arbitrary cross-section in python using the finite element method.
https://sectionproperties.rtfd.io
MIT License
412 stars 92 forks source link

Incorrect import lines in "Section-Properties overview-2.py" #433

Closed IsaakBerg closed 2 months ago

IsaakBerg commented 2 months ago

Issue

Issue

I tried to run overview-2.py to begin getting acquainted with section-properties. I had to change the import lines to get it to run. I'm on Windows 11 and I had set up Python3.8. I noticed since that this is not the preferred but I doubt my issue would change.

I was getting a lot of build errors along the lines of "unable to import" so I was able to fiddle around enough to find out that if I changed:

from sectionproperties.pre import Material
from sectionproperties.pre.library import rectangular_section, channel_section
from sectionproperties.analysis import Section

to

from sectionproperties.pre.pre import Material
from sectionproperties.pre.library.primitive_sections import rectangular_section
from sectionproperties.pre.library.steel_sections import channel_section
from sectionproperties.analysis.section import Section"

Then I got a beautiful graph of a steel-timber composite section with a triangular mesh, which I assume was the expected.

github-actions[bot] commented 2 months ago

Thanks for opening your first issue in sectionproperties :raised_hands: Pull requests are always welcome :wink:

robbievanleeuwen commented 2 months ago

Hi @IsaakBerg, sorry I cannot reproduce this issue - in fact the image in the documentation is automatically generated from the code each time the documentation is built.

Can you confirm you have correctly installed sectionproperties using pip install sectionproperties? Which version of sectionproperties do you have installed - the current version is 3.2.2. Also a further note is that the current version of sectionproperties only supports python >= 3.9.