[Bug 1336214] Re: pygame.surfarray.make_surface(numpyarray) gives IndexError

2018-02-12 Thread illume
This issue has been fixed in pygame 1.9.3+

>>> import pygame
>>> import numpy
>>> a = numpy.zeros((10,20,3), numpy.uint8)
>>> pygame.surfarray.make_surface(a)

>>> pygame.version.ver
'1.9.3'

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1336214

Title:
  pygame.surfarray.make_surface(numpyarray) gives IndexError

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pygame/+bug/1336214/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1336214] Re: pygame.surfarray.make_surface(numpyarray) gives IndexError

2014-10-26 Thread Florent Flament
By the wat, I found an ugly workaroud:

 >>> import pygame
 >>> surface = pygame.Surface((100, 100))
 >>> data = "abcdefg"
 >>> buf = surface.get_buffer()
 >>> buf.write(data, 0)
 Traceback (most recent call last):
   File "", line 1, in 
 IndexError: bytes to write exceed buffer size
 >>> buf.write(data*1, 0)
 >>>

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1336214

Title:
  pygame.surfarray.make_surface(numpyarray) gives IndexError

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pygame/+bug/1336214/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1336214] Re: pygame.surfarray.make_surface(numpyarray) gives IndexError

2014-10-26 Thread Florent Flament
Same error on Ubuntu 14.04 (Trusty)..

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1336214

Title:
  pygame.surfarray.make_surface(numpyarray) gives IndexError

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pygame/+bug/1336214/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1336214] Re: pygame.surfarray.make_surface(numpyarray) gives IndexError

2014-07-07 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: pygame (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1336214

Title:
  pygame.surfarray.make_surface(numpyarray) gives IndexError

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pygame/+bug/1336214/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1336214] Re: pygame.surfarray.make_surface(numpyarray) gives IndexError

2014-07-04 Thread Andrew Kay
This problem doesn't occur if I build pygame myself.

So is there some problem with the packaging?

please?

thanks

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1336214

Title:
  pygame.surfarray.make_surface(numpyarray) gives IndexError

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pygame/+bug/1336214/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1336214] Re: pygame.surfarray.make_surface(numpyarray) gives IndexError

2014-07-03 Thread Andrew Kay
sorry. error copying steps to reproduce. Should have been

$ python
>>> import numpy
>>> import pygame
>>> a = numpy.zeros((10,20,3), numpy.uint8)
>>> pygame.surfarray.make_surface(a)

output:
IndexError: bytes to write exceed buffer size
expected:



Further testing shows it works on a fresh install of Mint.
Failing on Kubuntu 14.04 LTS
Working on Xubuntu 12.04.4 LTS

** Description changed:

  Feeding a numpy array to make_surface gives an error:
  
  to reproduce:
  $ python
- >>> import numpy  

  
- >>> import pygame 

  
- >>> a = numpy.zeros((10,20,3), numpy.uint8)   

  
- >>> pygame.SurfaceArray.make_surface(a)  
+ >>> import numpy
+ >>> import pygame
+ >>> a = numpy.zeros((10,20,3), numpy.uint8)
+ >>> pygame.SurfaceArray.make_surface(a)
  
- output:   

 
- IndexError: bytes to write exceed buffer size   
+ output:
+ IndexError: bytes to write exceed buffer size
  expected:
- 
+ 
  
  Stepping through inside, it seems that the buffer has the right size,
  and the data is the right length at the point the buffer write occurs.
  But the buffer write fails (and I can't step that)
  
  I'm 99% certain that this worked before I upgraded from Kubuntu 13.10 to
  14.04
  
  ### transcript
- Python 2.7.6 (default, Mar 22 2014, 22:59:56) 

   
- [GCC 4.8.2] on linux2 

  
- >>> import numpy  

  
- >>> import pygame 

  
- >>> a = numpy.zeros((10,20,3), numpy.uint8)   

  
- >>> pygame.SurfaceArray.make_surface(a)   

   
- Traceback (most recent call last):


-   File "", line 1, in  

  
- AttributeError: 'module' object has no attribute 'SurfaceArray'   

  
- >>> pygame.surfarray.make_surface(a)  


- Traceback (most recent call last):

  
-   File "", line 1, in  

 
-   File "/usr/lib/python2.7/dist-packages/pygame/surfarray.py", line 243, in 
make_surface
   
- return numpysf.make_surface (array)