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

Win 10+anaconda python3.9.16,AttributeError: module 'openalea.strawberry' has no attribute 'import_mtgfile' #89

Closed
longwangtang opened this issue Jun 11, 2023 · 1 comment

Comments

@longwangtang
Copy link

运行如下代码时候报错:
import openalea.mtg as mtg
from oawidgets.plantgl import PlantGL
import openalea.strawberry as strawberry

g = strawberry.import_mtgfile.import_mtgfile(filename= ["Capriss"])
g.properties()['order'] = mtg.algo.orders(g)
scene=straberry.visu3d.plot3d(g,by=["Sample_date"],hide_leaves=False,display=False)
PlantGL(scene, group_by_color=True)

@longwangtang longwangtang changed the title Win 10+anaconda python3.9.16,import openalea.mtg as mtg from oawidgets.plantgl import PlantGL import openalea.strawberry as strawberry g = strawberry.import_mtgfile.import_mtgfile(filename= ["Capriss"]) g.properties()['order'] = mtg.algo.orders(g) scene=straberry.visu3d.plot3d(g,by=["Sample_date"],hide_leaves=False,display=False) PlantGL(scene, group_by_color=True) Win 10+anaconda python3.9.16,AttributeError: module 'openalea.strawberry' has no attribute 'import_mtgfile' Jun 11, 2023
@pradal
Copy link
Contributor

pradal commented Feb 13, 2024

The code was not valid. Here is a working example:

from openalea.mtg.algo import orders
from oawidgets.plantgl import PlantGL
from openalea.strawberry import visu3d
from openalea.strawberry.import_mtgfile import import_mtgfile

g = import_mtgfile(filename= ["Capriss"])
g.properties()['order'] = orders(g)
scene=visu3d.plot3d(g,by=["Sample_date"],hide_leaves=False,display=False)
PlantGL(scene, group_by_color=True)

@pradal pradal closed this as completed Feb 13, 2024
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