University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Error running PerlinNoiseDemo | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Error running PerlinNoiseDemo
May 14, 2016
4:57 am
Avatar
Member
Members
Forum Posts: 21
Member Since:
January 18, 2016
sp_UserOfflineSmall Offline

Hello

I've got the following error running PerlinNoiseDemo.py. Same effect ih just type "import random" in Command Window. Same on both platforms OSX and Win. No error if I type "import random" in python command line (without SB), file attached.

SB_Error

Attempted relative import in non-package

How can I fix it?

Thx

Tom & Igors

May 16, 2016
11:48 am
Avatar
Admin
Forum Posts: 980
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Looks like it can't find the random library. There is a file called .smartbodysettings which is in the same folder as the sbgui binary. If you set the pythonlibpath variable to your python path, does that fix the problem?

 

Ari

May 20, 2016
3:43 am
Avatar
Member
Members
Forum Posts: 16
Member Since:
January 19, 2016
sp_UserOfflineSmall Offline

Hello

Ari Shapiro said
Looks like it can't find the random library. There is a file called .smartbodysettings which is in the same folder as the sbgui binary. If you set the pythonlibpath variable to your python path, does that fix the problem?
  

Please explain. There is a hidden file .smartbodysettings there, with path to Python27 inside SB. Should I set it to my path e.g. "system" python path out of SB? Which path is "mine"? 🙂

And additional question: what is "specific" in the Python27 folder? Can I use "just python 2.7" installed on my machine?

Thank you

May 20, 2016
3:00 pm
Avatar
Admin
Forum Posts: 980
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

If you are running sbgui, then it looks for a file called .smartbodysettings and arranges some settings according to the contents of that file. You can set it to your system python path; smartbody is compiled with a particular 2.7 version, so they may be the same one and things will work properly.

 

Ari

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 733

Currently Online: mondayneedle1, juhlvalenzuela2, lanp4anase, worriedutopia9579, DixieDelgado, lyinglegacy8966, eric506784
84 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

jwwalker: 80

jyambao: 51

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 65

Members: 52460

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 427

Posts: 2343