# Processing.py

**URL:** https://discourse.processing.org/c/processing-py/9.md?page=13

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 14

---

## [Processing.py: Numpy import error](https://discourse.processing.org/t/processing-py-numpy-import-error/10935)

<div class="topic-metadata">

**Author:** [@LoliProcessor](https://discourse.processing.org/u/LoliProcessor)\
**Replies:** 5\
**Last updated:** [May 7, 2019, 8:09pm UTC](https://discourse.processing.org/t/processing-py-numpy-import-error/10935 "2019-05-07T20:09:48Z")

</div>

ImportError: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. Here is how to p…

---

## [How to prevent a PShape object to close?](https://discourse.processing.org/t/how-to-prevent-a-pshape-object-to-close/2340)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 11\
**Last updated:** [May 5, 2019, 9:24am UTC](https://discourse.processing.org/t/how-to-prevent-a-pshape-object-to-close/2340 "2019-05-05T09:24:03Z")

</div>

Hi everyone, I’d like to display a TRIANGLE\_STRIP mesh as a PShape object but when doing so the mesh “closes” on itself (lines connecting the last points to the first points of the mesh appear) Here’s an example to be …

---

## [Where should my size(640, 480) go in my py.processing code?](https://discourse.processing.org/t/where-should-my-size-640-480-go-in-my-py-processing-code/10858)

<div class="topic-metadata">

**Author:** [@SanguineL](https://discourse.processing.org/u/SanguineL)\
**Replies:** 5\
**Last updated:** [May 4, 2019, 12:33pm UTC](https://discourse.processing.org/t/where-should-my-size-640-480-go-in-my-py-processing-code/10858 "2019-05-04T12:33:22Z")

</div>

Hello, I am having some confusion about where my size() code will go. \` Balls = \[\] class Ball: def \_\_init\_\_(self, x, y, xvel, yvel, radius): global Balls self.x = x self.y = y self.x…

---

## [Movie Maker video doesn't sync](https://discourse.processing.org/t/movie-maker-video-doesnt-sync/9435)

<div class="topic-metadata">

**Author:** [@lnp](https://discourse.processing.org/u/lnp)\
**Replies:** 17\
**Last updated:** [May 1, 2019, 12:52pm UTC](https://discourse.processing.org/t/movie-maker-video-doesnt-sync/9435 "2019-05-01T12:52:22Z")

</div>

I’ve got an issue with the native Movie Maker where the video rate exports with a framerate greater than specified. My sketch reacts to sound input so it’s clear to see that the exported .mov visuals don’t sync with the …

---

## [Edge division problem in Growth Algorithm](https://discourse.processing.org/t/edge-division-problem-in-growth-algorithm/10547)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 1\
**Last updated:** [April 23, 2019, 1:24pm UTC](https://discourse.processing.org/t/edge-division-problem-in-growth-algorithm/10547 "2019-04-23T13:24:50Z")

</div>

Dear all, I’m having difficulties implementing with “toxiclibs” a sketch initially relying on the “iGeo” library. The original script is fairly long so I tried to boil it down to its simplest form but its relative comp…

---

## [Convert Java code to python code](https://discourse.processing.org/t/convert-java-code-to-python-code/10549)

<div class="topic-metadata">

**Author:** [@aisyah](https://discourse.processing.org/u/aisyah)\
**Replies:** 1\
**Last updated:** [April 23, 2019, 3:29am UTC](https://discourse.processing.org/t/convert-java-code-to-python-code/10549 "2019-04-23T03:29:51Z")

</div>

Hi, i have several java code to build transliteration system that can solve homograph and disambiguation. But i have a problem to convert java code into python code. Im really thankful if you can help me. Here is the cod…

---

## [Processing Python error](https://discourse.processing.org/t/processing-python-error/10492)

<div class="topic-metadata">

**Author:** [@Kabir](https://discourse.processing.org/u/Kabir)\
**Replies:** 1\
**Last updated:** [April 20, 2019, 2:58pm UTC](https://discourse.processing.org/t/processing-python-error/10492 "2019-04-20T14:58:24Z")

</div>

I am using Processing 3.4. I installed the python module in processing. It installed well. But when I wanted to run a sketch it said - Failed to install ‘’: java.nio.charset.UnsupportedCharsetException: cp0. Please help…

---

## [Array Index Out of Bounds error on PGraphics.text()](https://discourse.processing.org/t/array-index-out-of-bounds-error-on-pgraphics-text/10239)

<div class="topic-metadata">

**Author:** [@JRH](https://discourse.processing.org/u/JRH)\
**Replies:** 5\
**Last updated:** [April 13, 2019, 11:25pm UTC](https://discourse.processing.org/t/array-index-out-of-bounds-error-on-pgraphics-text/10239 "2019-04-13T23:25:09Z")

</div>

Hello; new here. :wave: I have no idea what part of this is breaking. I have tried to reduce this as best as I can to a minimal example. I have a class defined in a separate tab which is meant to represent something li…

---

## [Working on a challenging project, need suggestions](https://discourse.processing.org/t/working-on-a-challenging-project-need-suggestions/10209)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 0\
**Last updated:** [April 12, 2019, 10:58am UTC](https://discourse.processing.org/t/working-on-a-challenging-project-need-suggestions/10209 "2019-04-12T10:58:49Z")

</div>

Yesterday, I suddently decided to simulate and Undertale fight. For now I just did the arena and menu selection and now I am planning to create the events on the selection of a button, before starting with the hard part…

---

## [Constrain() player movement not working](https://discourse.processing.org/t/constrain-player-movement-not-working/10199)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 2\
**Last updated:** [April 12, 2019, 12:05am UTC](https://discourse.processing.org/t/constrain-player-movement-not-working/10199 "2019-04-12T00:05:05Z")

</div>

def keyPressed(): if key == 'w' or key == 'W': player.pos.y == constrain(player.pos.y - player.vel,arena.pos.y,arena.pos.y + arena.h) elif key == 's' or key == 'S': player.pos.y == constrain(playe…

---

## [Charset exception](https://discourse.processing.org/t/charset-exception/10093)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 2\
**Last updated:** [April 9, 2019, 3:29pm UTC](https://discourse.processing.org/t/charset-exception/10093 "2019-04-09T15:29:13Z")

</div>

I passed to a friend of mine a project (in Python), but he got this error: I didnt use any font

---

## [Created a class with a SoundFile() in it,got IndexOutOfBoundsException](https://discourse.processing.org/t/created-a-class-with-a-soundfile-in-it-got-indexoutofboundsexception/10099)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 1\
**Last updated:** [April 8, 2019, 7:59pm UTC](https://discourse.processing.org/t/created-a-class-with-a-soundfile-in-it-got-indexoutofboundsexception/10099 "2019-04-08T19:59:35Z")

</div>

processing.app.SketchException: java.lang.IndexOutOfBoundsException add\_library('sound') class a: def \_\_init\_\_(self,aa): self.mus = SoundFile(this,aa) def setup(): size(500,500) b = a("AbsolutePath\\\\…

---

## [\[Need Opinion\]Comb Sort Visualization 👀](https://discourse.processing.org/t/need-opinion-comb-sort-visualization/10017)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 1\
**Last updated:** [April 7, 2019, 6:41pm UTC](https://discourse.processing.org/t/need-opinion-comb-sort-visualization/10017 "2019-04-07T18:41:40Z")

</div>

width = 1000 height = width / 2 l = 10 num = width / l h = \[\] gap = int(num \* 0.7) count = 0 def setup(): size(width,height) for i in range(num): h.append(map(i,0,num,0,height)) shuffl() def dr…

---

## [\[SOLVED\]\[not swapping\]Need help with Comb Sort visualzation](https://discourse.processing.org/t/solved-not-swapping-need-help-with-comb-sort-visualzation/9894)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 4\
**Last updated:** [April 5, 2019, 9:07pm UTC](https://discourse.processing.org/t/solved-not-swapping-need-help-with-comb-sort-visualzation/9894 "2019-04-05T21:07:25Z")

</div>

from SkyScrapperClasSS import Sky width = 1000 height = width/2 num = 100 heights = \[\] counter = 0 gap = num\*10/13 swapped = False caounter = 0 getg = False r = color(255,0,0) def setup(): size(width,height) fo…

---

## [Guido cannot work in python mode](https://discourse.processing.org/t/guido-cannot-work-in-python-mode/9501)

<div class="topic-metadata">

**Author:** [@fish](https://discourse.processing.org/u/fish)\
**Replies:** 13\
**Last updated:** [March 31, 2019, 2:58am UTC](https://discourse.processing.org/t/guido-cannot-work-in-python-mode/9501 "2019-03-31T02:58:36Z")

</div>

I translated guido exmple into python mode,but it cannot work,thanks for help add\_library('Guido') def setup (): global slider size(400, 400); Interactive.make( this ) slider = Slider( 2,…

---

## [Examples for 'Getting started with Processing.py' book](https://discourse.processing.org/t/examples-for-getting-started-with-processing-py-book/9530)

<div class="topic-metadata">

**Author:** [@toffeln](https://discourse.processing.org/u/toffeln)\
**Replies:** 3\
**Last updated:** [March 25, 2019, 9:59pm UTC](https://discourse.processing.org/t/examples-for-getting-started-with-processing-py-book/9530 "2019-03-25T21:59:07Z")

</div>

Hi, I’m new to programming and bought the book Getting started with processing.py. All code in the book works but when I open the examples they are coded for java. I’ve searched but can’t find the same examples for pyth…

---

## [No module winsound](https://discourse.processing.org/t/no-module-winsound/8512)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 5\
**Last updated:** [March 22, 2019, 9:30am UTC](https://discourse.processing.org/t/no-module-winsound/8512 "2019-03-22T09:30:52Z")

</div>

import winsound not working (but in IDLE it works)

---

## [Debugger for python mode](https://discourse.processing.org/t/debugger-for-python-mode/9426)

<div class="topic-metadata">

**Author:** [@hsamala](https://discourse.processing.org/u/hsamala)\
**Replies:** 1\
**Last updated:** [March 20, 2019, 7:52am UTC](https://discourse.processing.org/t/debugger-for-python-mode/9426 "2019-03-20T07:52:02Z")

</div>

This is a quick question but… Is there a debugger for the Python mode in Processing? I have a program with some bugs and it would be really helpful if there is one

---

## [Fixing bullet trajectory](https://discourse.processing.org/t/fixing-bullet-trajectory/9063)

<div class="topic-metadata">

**Author:** [@hsamala](https://discourse.processing.org/u/hsamala)\
**Replies:** 14\
**Last updated:** [March 19, 2019, 7:40pm UTC](https://discourse.processing.org/t/fixing-bullet-trajectory/9063 "2019-03-19T19:40:09Z")

</div>

Hello Everyone!!! I am relatively new to Processing as a whole and would like some assistance. I am trying to make a spaceship game where when the player presses the w key it fires a bullet Unfortunately, the bullet o…

---

## [Sublime package for Processing.py / PYDE](https://discourse.processing.org/t/sublime-package-for-processing-py-pyde/9320)

<div class="topic-metadata">

**Author:** [@lnp](https://discourse.processing.org/u/lnp)\
**Replies:** 2\
**Last updated:** [March 15, 2019, 8:06am UTC](https://discourse.processing.org/t/sublime-package-for-processing-py-pyde/9320 "2019-03-15T08:06:53Z")

</div>

First time poster here! Did a little processing way back when and recently discovered it has a Python mode. Hoohaa! So my question is the above. Is there a sublime package for working with PYDE files? Or does anyone kno…

---

## [Visualization of Uber cars using Processing 3 sketch](https://discourse.processing.org/t/visualization-of-uber-cars-using-processing-3-sketch/8999)

<div class="topic-metadata">

**Author:** [@kkxxbdm](https://discourse.processing.org/u/kkxxbdm)\
**Replies:** 3\
**Last updated:** [March 9, 2019, 4:19pm UTC](https://discourse.processing.org/t/visualization-of-uber-cars-using-processing-3-sketch/8999 "2019-03-09T16:19:59Z")

</div>

Hi. I really like this processing software. I’m fairly new and I need some help. I was thinking to visualize the movement of Uber cars using Processing 3 sketch, unfolding map and python. I encountered this transition-la…

---

## [\[Very tiny little micro game\] 🐍 What do you think about this?](https://discourse.processing.org/t/very-tiny-little-micro-game-what-do-you-think-about-this/8697)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 5\
**Last updated:** [February 26, 2019, 12:43pm UTC](https://discourse.processing.org/t/very-tiny-little-micro-game-what-do-you-think-about-this/8697 "2019-02-26T12:43:11Z")

</div>

:snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :s…

---

## [Issue when porting an example sketch from the Hemesh library to Python mode](https://discourse.processing.org/t/issue-when-porting-an-example-sketch-from-the-hemesh-library-to-python-mode/8570)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 7\
**Last updated:** [February 23, 2019, 6:49pm UTC](https://discourse.processing.org/t/issue-when-porting-an-example-sketch-from-the-hemesh-library-to-python-mode/8570 "2019-02-23T18:49:59Z")

</div>

Hi, For some reason I get a ClassCastException error when porting this sketch (code below) to Python mode. processing.app.SketchException: java.lang.ClassCastException: wblut.geom.WB\_Triangle cannot be cast to wblut.g…

---

## [Am I crazy, or is this a bug?](https://discourse.processing.org/t/am-i-crazy-or-is-this-a-bug/8612)

<div class="topic-metadata">

**Author:** [@Livaarleen](https://discourse.processing.org/u/Livaarleen)\
**Replies:** 3\
**Last updated:** [February 23, 2019, 12:02am UTC](https://discourse.processing.org/t/am-i-crazy-or-is-this-a-bug/8612 "2019-02-23T00:02:52Z")

</div>

I have been trying to make a Processing for Python variation of the Coding Train episode on the toothpick fractal. When I run my code, I get an error on line 56, saying that my method toothpick.intersects(x, y) takes tw…

---

## [NoneType error in Python Processing](https://discourse.processing.org/t/nonetype-error-in-python-processing/8579)

<div class="topic-metadata">

**Author:** [@Livaarleen](https://discourse.processing.org/u/Livaarleen)\
**Replies:** 3\
**Last updated:** [February 22, 2019, 2:40am UTC](https://discourse.processing.org/t/nonetype-error-in-python-processing/8579 "2019-02-22T02:40:18Z")

</div>

Hi. I am completely new to Processing, and know nothing of Java, but I am fairly experienced with Python, so I have been writing some code with the Python version of Processing. I am writing a code that moves particles…

---

## [\[SOLVED\] Py.processing bullet and enemy collision](https://discourse.processing.org/t/solved-py-processing-bullet-and-enemy-collision/8327)

<div class="topic-metadata">

**Author:** [@warsoldier011](https://discourse.processing.org/u/warsoldier011)\
**Replies:** 7\
**Last updated:** [February 14, 2019, 12:54pm UTC](https://discourse.processing.org/t/solved-py-processing-bullet-and-enemy-collision/8327 "2019-02-14T12:54:45Z")

</div>

Hello there I am currently dealing with a bullet and enemy collision problem. I’m trying to kill both the enemy and the bullet and remove them from the screen, when they intersect each other. It works once and then I rec…

---

## [Processing not run in python mode](https://discourse.processing.org/t/processing-not-run-in-python-mode/8320)

<div class="topic-metadata">

**Author:** [@pisigor](https://discourse.processing.org/u/pisigor)\
**Replies:** 8\
**Last updated:** [February 12, 2019, 3:16pm UTC](https://discourse.processing.org/t/processing-not-run-in-python-mode/8320 "2019-02-12T15:16:30Z")

</div>

hi.processing is working perfect in java but not in python mode.i open examples or write a basic code and when i click run, nothing happens.no show errors.the run button turn yellow while i click and turn grey again.what…

---

## [\[SOLVED\] PVector in py.processing problem](https://discourse.processing.org/t/solved-pvector-in-py-processing-problem/8306)

<div class="topic-metadata">

**Author:** [@warsoldier011](https://discourse.processing.org/u/warsoldier011)\
**Replies:** 2\
**Last updated:** [February 12, 2019, 1:56am UTC](https://discourse.processing.org/t/solved-pvector-in-py-processing-problem/8306 "2019-02-12T01:56:50Z")

</div>

Hello there, I’ve currently run into a problem using PVector’s in py.processing. I’m trying to make a bouncing ball program using PVectors instead of plain old x, y , xspeed, yspeed, etc. However, when I try to add the c…

---

## [Computing polygon normal with Newell's method](https://discourse.processing.org/t/computing-polygon-normal-with-newells-method/8116)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 2\
**Last updated:** [February 4, 2019, 9:53pm UTC](https://discourse.processing.org/t/computing-polygon-normal-with-newells-method/8116 "2019-02-04T21:53:33Z")

</div>

Hi guys, I’m having difficulties computing the normal of a polygon (more than 3 vertices) based on the Newell’s method. 𝑛𝑥=∑𝑖=0𝑛(𝑦𝑖−𝑦𝑖+1)(𝑧𝑖+𝑧𝑖+1) 𝑛𝑦=∑𝑖=0𝑛(𝑧𝑖−𝑧𝑖+1)(𝑥𝑖+𝑥𝑖+1) …

---

## [\[SOLVED\] Need help with rotations](https://discourse.processing.org/t/solved-need-help-with-rotations/7861)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 2\
**Last updated:** [January 27, 2019, 12:12pm UTC](https://discourse.processing.org/t/solved-need-help-with-rotations/7861 "2019-01-27T12:12:01Z")

</div>

width = 700 height = 500 recto = PVector(0,0) mouse = PVector(0,0) def setup(): size(width,height) rectMode(CENTER) def draw(): background(191) mouse.x = mouseX mouse.y = mouseY pushMatrix() …

[Previous page](https://discourse.processing.org/c/processing-py/9.md?page=12)

[Next page](https://discourse.processing.org/c/processing-py/9.md?page=14)
