Problem with tutorial "How to define a machine"
Closed this issue · 0 comments
Hello,
I have just started experimenting with Pyleecan, but I am getting an error on the plotting function for the machine. Can someone help me with this?
I am using Python 3.9 with Pyleecan version: 1.5.1 and SciDataTool version: 2.5.0
Thanks
ImportError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_2220\2556304234.py in <cell line: 5>()
3 # In Jupyter notebook, we set is_show_fig=False to skip call to fig.show() to avoid a warning message
4 # All plot methods return the corresponding matplotlib figure and axis to further edit the resulting plot
----> 5 fig, ax = IPMSM_A.plot(is_show_fig=False)
C:\app\Python39\lib\site-packages\pyleecan\Methods\Machine\Machine\plot.py in plot(self, fig, ax, sym, alpha, delta, is_edge_only, edgecolor, is_add_arrow, comp_machine, comp_legend, is_show_fig, save_path, win_title, fig_title, is_max_sym, is_clean_plot, is_winding_connection)
106 Rext = lam_list[-1].Rext
107 for lam in lam_list[::-1]:
--> 108 lam.plot(
109 fig=fig,
110 ax=ax,
C:\app\Python39\lib\site-packages\pyleecan\Classes\LamSlotWind.py in (x)
205 if isinstance(plot, ImportError):
206 plot = property(
--> 207 fget=lambda x: raise_(
208 ImportError("Can't use LamSlotWind method plot: " + str(plot))
209 )
C:\app\Python39\lib\site-packages\pyleecan\Classes_check.py in raise_(ex)
345 def raise_(ex):
346 """Function to raise an exeption for the method import lambda"""
--> 347 raise ex
348
349
ImportError: Can't use LamSlotWind method plot: No module named 'swat_em'