issue with ymport

Asked by Othman Sh

Hello,

I'm using Yade 2018.02b. I want to import sphere coordinates from a text file that I created using a separate script using export.textExt('name','x_y_z_r')

to do that, I'm using ymport

O.bodies.append(ymport.text('name',format='x_y_z_r'))

But I get this error: NameError: name 'ymport' is not defined

I also tried: O.bodies.append(ymport.textExt('name',format='x_y_z_r')) but I still get the same error.

Can someone help with this error?

Thank you,
Othman

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Othman Sh
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

You probably missed to add a statement like

from yade import ymport

at the beginning of your script.

Revision history for this message
Othman Sh (othman-sh) said :
#2

Hi Manfred,

Thanks for your reply.

I tried: from yade import ymport

and I still get the same error

Revision history for this message
Chareyre (bruno-chareyre-9) said :
#3

Can't be answered without without a script.

Le ven. 11 janv. 2019 19:13, Othman Alshareedah <
<email address hidden>> a écrit :

> Question #677475 on Yade changed:
> https://answers.launchpad.net/yade/+question/677475
>
> Status: Answered => Open
>
> Othman Alshareedah is still having a problem:
> Hi Manfred,
>
> Thanks for your reply.
>
>
> I tried: from yade import ymport
>
> and I still get the same error
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>
>

Revision history for this message
Othman Sh (othman-sh) said :
#4

I tried the code on my other computer and it works. It seems like there was an issue with my Yade installation or something else. Thanks for your answers and the problem is solved.