FANDOM


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 (Fractal Dimensia) 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 also attach:

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

Troubleshooting InstallationEdit

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

Installing Python and PyCarraraEdit

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.

ProblemsEdit

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

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

Steps to Attempt ResolutionEdit

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 copy the PyCarrara files into your Carrara folder. 

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 PIAEdit

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 MessagesEdit

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).

ProblemEdit

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 ResolutionEdit

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 MessagesEdit

Before PIA generates a PySwarm script (when you click the "Generate Script..." button), PIA does a number of diagnostic checks on the values you have to make sure they make sense, and that you will get the results you expect. For example, it does not make sense to have a start time AFTER the end time. PIA will flag inconsistencies as errors if it finds any such problems.

ProblemEdit

You get an error message such as the following when you attempt to generate a PySwarm script:

PIA Gen Script Error Message
















Steps to Attempt ResolutionEdit

1. Follow the directions provided to resolve the problem, and click the "Generate Script..." button again.


Script Generation WarningsEdit

In addition to error messages when you attempt to generate a script, you may also get warning messages. The difference between an error and a warning is that PIA will abort the script generation process if you get an error. You can elect to proceed with the process even if you have warnings. However, while the resulting PySwarm script should not cause problems when importing it into your scene, you may not get the behavior you are expecting.

ProblemEdit

You get an error message such as the following when you attempt to generate a PySwarm script:

PIA Gen Script Warning Message
















Steps to Attempt ResolutionEdit

1. If you wish to continue with generating the script, click "Yes"; otherwise, click "No" and correct the parameter fields as desired.

Known PIA BugsEdit

<TBD>

Troubleshooting the PySwarm ScriptEdit

Though PIA catches a number of problems when attempting to import your PySwarm into your Carrara scene, some errors can still occur. This section will offer explanations for known errors and how to resolve them.

Unable to Find an ObjectEdit

The most common problem encountered when importing the PySwarm script is when an object in your Carrara scene that you have referenced could not be found. If this occurs, PySwarm will terminate.

ProblemEdit

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 _____


Note: Import error messages are available starting with PySwarm V0.5.2. Previous versions of PySwarm do not print these messages. The following screenshot shows where these messages will appear.

Import Error Message







Steps to Attempt ResolutionEdit

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







Known PySwarm BugsEdit

<TBD>

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.