PySwarm Wiki
No edit summary
Line 67: Line 67:
 
==Troubleshooting PIA==
 
==Troubleshooting PIA==
   
The PySwarm Interface App (PIA) was developed to simplify the user interface for creating PySwarm script, while at the same time ensuring most scripting errors and problems have been resolved BEFORE generating a script. As a result, you may encounter a number of problems while using PIA. Rather than going through every one, they can be generalized into the following:
+
The PySwarm Interface App (PIA) was developed to simplify the user interface for creating PySwarm script, while at the same time ensuring most scripting errors and problems have been resolved BEFORE generating a script. As a result, you may encounter a number of error messages and warnings while using PIA. Rather than going through every possible error, they can be generalized into the following types:
 
*Parameter Value Error Messages
  +
*Script Generation Error Messages
  +
*Script Generation Warnings
  +
  +
===Parameter Value Error Messages===
  +
When you edit parameter fields, PIA intercepts your keystrokes and verifies that you are typing a valid character for the field that currently has focus. For example, you will note that you cannot type an alphanumeric key (e.g., "A" - "Z") in a field that is expecting a number. Also, PIA will not allow you to use a decimal delimitor (".") for fields expecting a whole number (like "Number of BOIDs") or to use a negative sign ("-") in fields where only positive numbers are allowed (like "Number of BOIDs").
  +
  +
Even with these precautions, you may still inadvertently entered a string of keystrokes that cannot be interpreted correctly (for example, "54.54.33" is not a valid number).
  +
  +
<u>Problem</u>
  +
When attempting to switch projects, save parameters to file, generate a script, or exit the program, you get an error message similar to the following:
  +
[[File:PIA_Field_Error_Message.jpg|left]]
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
   
   
===PIA Error Messages===
 
<p style="margin-top:1em;margin-bottom:1em;"><u>Problem</u></p>
 
   
   
Line 78: Line 99:
 
====<u>Steps to Attempt Resolution</u>====
 
====<u>Steps to Attempt Resolution</u>====
   
  +
PIA will not save the parameters or allow you to generate a script until you resolve all parameter value errors.
  +
  +
1. PIA will automatically go to the tab containing the parameter field where the error is. Edit the field and fix the problem.
  +
  +
===Script Generation Error Messages===
  +
  +
Before generating a PySwarm script,
   
<span style="font-size:17px;">PIA Warnings </span>
 
 
<u>Problem</u>
 
<u>Problem</u>
   
Line 86: Line 113:
   
 
====<u>Steps to Attempt Resolution</u>====
 
====<u>Steps to Attempt Resolution</u>====
  +
===Script Generation Warnings===
   
  +
====<u>Problem</u>====
   
   
  +
====<u>Steps to Attempt Resolution</u>====
   
 
==Troubleshooting the PySwarm Script==
 
==Troubleshooting the PySwarm Script==

Revision as of 11:50, 17 January 2014

This wiki page provides some information about how to deal with various problems you may encounter while using PySwarm.

If you encounter a problem that is not covered in this section, please email me with the following information:

  • Screenshot of the error message you are getting
  • An explanation of what you are trying to do

It would also be helpful if you could provide:

  • Your PySwarm script, or the declaration portion of the script
  • Your .CAR scene file

Troubleshooting Installation

A number of people have expressed issues getting the PyCarrara plug-in to work properly on their systems.

Installing Python and PyCarrara

If you are having difficulties with getting Carrara to find either Python or PyCarrara, it is probably a good idea to review the entire installation.

Problems

Problems you may encounter if Python and/or the PyCarrara plug-in are not properly installed:

  • ".py" does not appear in the "Files of type" dropdown list when attempting to import your PySwarm script
  • An "Unable to find PyCarrara" message

Steps to Attempt Resolution

1. Review the wiki page on installing Python and PyCarrara here. Make sure you followed the steps PRECISELY. If you're not sure, uninstall Python and then follow the steps again to reinstall Python and PyCarrara. 

2. Validate you have the right version of Python installed (V2.6.6 is recommended) and that it is visible. From your Windows Control Panel, select "Programs and Features".  Verify "Python 2.6.6" appears in the list.

3. You should have a folder on your hard drive - "c:/python26". In that folder, run the app "Python.exe". You should get the Python command line shown below.

Python interpreter 1









4. On the command line, type "4+4" and hit return. It should return the value 8. If you did, then Python is most likely installed correctly.



Python interpreter 2









Troubleshooting PIA

The PySwarm Interface App (PIA) was developed to simplify the user interface for creating PySwarm script, while at the same time ensuring most scripting errors and problems have been resolved BEFORE generating a script. As a result, you may encounter a number of error messages and warnings while using PIA. Rather than going through every possible error, they can be generalized into the following types:

  • Parameter Value Error Messages
  • Script Generation Error Messages
  • Script Generation Warnings

Parameter Value Error Messages

When you edit parameter fields, PIA intercepts your keystrokes and verifies that you are typing a valid character for the field that currently has focus. For example, you will note that you cannot type an alphanumeric key (e.g., "A" - "Z") in a field that is expecting a number. Also, PIA will not allow you to use a decimal delimitor (".") for fields expecting a whole number (like "Number of BOIDs") or to use a negative sign ("-") in fields where only positive numbers are allowed (like "Number of BOIDs").

Even with these precautions, you may still inadvertently entered a string of keystrokes that cannot be interpreted correctly (for example, "54.54.33" is not a valid number).

Problem When attempting to switch projects, save parameters to file, generate a script, or exit the program, you get an error message similar to the following:

PIA Field Error Message









Steps to Attempt Resolution

PIA will not save the parameters or allow you to generate a script until you resolve all parameter value errors.

1. PIA will automatically go to the tab containing the parameter field where the error is. Edit the field and fix the problem.

Script Generation Error Messages

Before generating a PySwarm script,

Problem



Steps to Attempt Resolution

Script Generation Warnings

Problem

Steps to Attempt Resolution

Troubleshooting the PySwarm Script

A number of problems can occur when attempting to import your PySwarm into your Carrara scene. This section will offer some explanations for some of these.


Problem The PySwarm import aborts with one of the following messages:

      • PySwarm was unable to find a BOID named _____***
      • PySwarm was unable to find a camera named _____***
      • PySwarm was unable to find a camera focus named _____***
      • PySwarm was unable to find the attractor object named _____***

The following screenshot shows where these messages will appear.

Import Error Message







Steps to Attempt Resolution

These error messages occur because PySwarm was unable to find the object by the name you entered into PIA.

1. Compare the name of the object in the error message to the names in your Carrara scene. Remember that names must match PRECISELY.

2. If the names seem to be the same, the problem may be in an extra space or other special character in the name that is the difference. In Carrara, select the object, and under the "General" tab, highlight the object's entire name. Copy it (Ctrl-C) and then paste the text in the appropriate PIA field for that name (Ctrl-P).

3. If the object PySwarm cannot find is a BOID, make sure you have (at least) the number of BOIDs in your Carrara scene that you have defined in PIA's "Number of BOIDs" field. For example, if you were to have 20 BOIDs in your scene, but you entered 25 in PIA's "Number of BOIDs" field, you will get this error:

Import Error Message 2







Steps to Attempt Resolution