Not able to use PVector #6

Closed
jarav opened this Issue Sep 14, 2010 · 6 comments

Comments

Projects
None yet
2 participants
@jarav

jarav commented Sep 14, 2010

Defining a variable of type PVector gives :
NameError: global name 'PVector' is not defined

@jdf

This comment has been minimized.

Show comment
Hide comment
@jdf

jdf Sep 14, 2010

Owner

Thanks, and good catch. I'll fix it, but you can work around it today by explicitly importing it:

from processing.core import PVector
Owner

jdf commented Sep 14, 2010

Thanks, and good catch. I'll fix it, but you can work around it today by explicitly importing it:

from processing.core import PVector
@jarav

This comment has been minimized.

Show comment
Hide comment
@jarav

jarav Sep 14, 2010

But after doing that, I am getting this:
SystemError: Automatic proxy initialization should only occur on proxy classes

jarav commented Sep 14, 2010

But after doing that, I am getting this:
SystemError: Automatic proxy initialization should only occur on proxy classes

@jdf

This comment has been minimized.

Show comment
Hide comment
@jdf

jdf Sep 14, 2010

Owner

I can't reproduce that problem, and I can't even figure out where that error message might be coming from.

What happens if you run the sketch

from processing.core import PVector
print PVector(1,2,3)

?

Owner

jdf commented Sep 14, 2010

I can't reproduce that problem, and I can't even figure out where that error message might be coming from.

What happens if you run the sketch

from processing.core import PVector
print PVector(1,2,3)

?

@jdf

This comment has been minimized.

Show comment
Hide comment
@jdf

jdf Sep 14, 2010

Owner

If the test code I've provided does work for you, but your code does not, please create as small an example as possible that throws the error, and paste it here. Thanks very much.

Owner

jdf commented Sep 14, 2010

If the test code I've provided does work for you, but your code does not, please create as small an example as possible that throws the error, and paste it here. Thanks very much.

@jarav

This comment has been minimized.

Show comment
Hide comment
@jarav

jarav Sep 14, 2010

Really sorry for not giving you the context in which I got the error. Here is the sample code:
from processing.core import PVector
import copy

def setup():
a = [PVector(1,2), PVector(3,4), PVector(5,6)]
b = copy.deepcopy(a)
print b[0]

Also PVector.sub(v1, v2) for PVectors v1 and v2 gives 'None'.

jarav commented Sep 14, 2010

Really sorry for not giving you the context in which I got the error. Here is the sample code:
from processing.core import PVector
import copy

def setup():
a = [PVector(1,2), PVector(3,4), PVector(5,6)]
b = copy.deepcopy(a)
print b[0]

Also PVector.sub(v1, v2) for PVectors v1 and v2 gives 'None'.

@jdf

This comment has been minimized.

Show comment
Hide comment
@jdf

jdf Sep 14, 2010

Owner

OK, you no longer need to explicitly import core Processing classes in your sketches as of build 0013.

Owner

jdf commented Sep 14, 2010

OK, you no longer need to explicitly import core Processing classes in your sketches as of build 0013.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment