Running
Q: Why is OSX complaining that it cannot connect to the display?
A: In OSX the error message:
_tkinter.TclError: this isn't a Tk applicationcouldn't connect to display ":0.0"
probably means that the X server is either not running or appears to be running but has become knackered. The solution is to start the X server (after stopping it, if it already appears to be running). The X server application is Applications/Utilities/X11 (in the Finder).
Q: Why is OSX complaining about the $DISPLAY environment variable?
A: In OSX the error message:
_tkinter.TclError: no display name and no $DISPLAY environment variable
probably means that the DISPLAY environment variable has not been set. In bash this should be set by:
export DISPLAY=:0.0
(possibly placed in .bashrc) and in csh/tcsh (and similar variants) this should be set by:
setenv DISPLAY :0.0
(possibly placed in .cshrc).
Q: Why is the text of the menus coming out as unreadable gibberish?
A: It probably means that the font that Analysis is trying to use is not available on the computer and some messed up variant is being substituted instead. This is not easy to fix in Analysis because it is impossible to read the menus, so unless you remember which menu is which, you will have a hard time changing the font to something else.
The best way to deal with this is to change the font in the relevant XML file. Check for the two files:
PROJECT_DIR/ccpnmr/AnalysisProfile/*.xml
and
~/.ccpn/data/ccpnmr/AnalysisProfile/*.xml
Here PROJECT_DIR is the project directory, ~ is the user's home directory, and the * represents some long semi-meaningful string which depends on the project, the user and the time the file was created.
One or other of these files might not exist, but check whichever does. In the file check for lines like:
<ANAP.AnalysisProfile.font>
<IMPL.Line>Lucida 12</IMPL.Line>
</ANAP.AnalysisProfile.font>
These lines might not occur but if they do then the font that is named is likely to be the font that is causing the trouble. Try changing it to "Helvetica 12", then save the file.
Start up Analysis again and hopefully the problem will be solved.
Q: What do I do if Analysis will not start up because of a coding error?
A: This probably means that something has been uploaded to the update server that has fundamentally broken Analysis. Notify the Analysis developers (e.g. via the JISCMAIL mailing list at http://www.jiscmail.ac.uk/lists/CCPNMR.html). When they have fixed the problem run the script ccpnmr/bin/updateAll and it should then allow you to start up Analysis again.
Q: What can I do to speed Analysis up?
A: Analysis caches a certain amount of spectrum data and contours. But with large data sets this caching starts to be ineffective, as it keeps getting refreshed. By default Analysis works with 128 Megawords (so 512 megabytes) as the limit of the amount of memory allocated for the cache. If your computer has more memory then it's worth increasing the cache size. But note that this is the memory just of the cache, and Analysis also uses lots of memory for Python objects. To set the cache size to be something other than the default, you use the optional -m flag when starting up Analysis. For example, to set the cache to be 256 Megawords (so 1 Gb) do:
analysis -m 256
Q: What do the following error messages and warnings say and how can I go further when they occur?
First loading attempt failed - compatibility problem? / Some files unfindable - has project moved? In either case followed by "Re-trying, skipping cached TopObjects:"
As long as the project loads, all should actually be OK. For efficiency the Project XML file contains small shell objects for all known TopObjects. When files are moved or the project is upgraded the cached information may point to files that can no longer can be found. The program will then erase the cache and look directly at the available files. If there are no other error messages, everything is fine and you can ignore this message. If other things go wrong, you should report this in a bug report, as it might help pinpoint the problem.
Cannot downgrade to older version: “memops.general.Implementation.ApiError: Could not import memops.format.compatibility.downgrade.v_2_3_b3 Forwards compatibility from 2.1.b3 to 2.0.b3 missing. Trying to load new-version data with old-version code?”
This happens if you are trying to read a file that is produced by a newer version of the CCPN than your program. In the example above your program version is 2.0.b3 and your data file version is 2.1.b3. Note that these are NOT the same as the Analysis version you see when you open the program. The common reasons are:
You have got a project from someone else that runs a newer version. The best solution is to upgrade to the new version yourself. By upgrading CCPN software all old v2 projects can still be read. v1 projects will need to be updated by the CCPN web server.
You are working with two different Analysis versions internally. You should consider getting rid of the older version. If that is impossible you need to keep track of which projects go with which version. If you are working with two different versions, you often get problems with the files in MYHOME/.ccpn/data/ccpnmr/AnalysisProfile/. These hold the user's Analysis profile, and are shared between all projects. If this is your problem you will get an error even when opening a new project in Analysis This problem can be fixed as follows:
Get the current model version from the error message.
Edit the Analysis Profile file (CAUTION: hand-editing CCPN XML files can cause hard-to-fix bugs): Use a text-only editor (vi, nedit, wordpad, ...) to open the file in MYHOME/.ccpn/data/ccpnmr/AnalysisProfile/.The second line will start with something like '<_StorageUnit release="2.0.b3" '
Check that the release in the file is the one you would expect from the error message. If it is, change it to be the same as the version of your program. Now open Analysis, and create a new Project to test. This fix may fail for some model versions, where the Analysis profile part for the model has changed. If it does, move your Analysis profile file to a different location (or delete the directory it is in) and start gain. This will force you to re-enter any changes you have made to the standard Analysis profile.
Project Not Valid, cannot load: “File "/home/rhf22/cvsroots/stable/all/python/memops/xml/Implementation.py", line 4391, in loadFromStream for event, elem in ElementTree.iterparse(stream, events=("start", "end")): File "<string>", line 68, in __iter__SyntaxError: no element found: line 271278, column 0”
1. This can happen if your computer crashes or the disk is full mid-save. Can also occur
if a project was saved inside / on top of an existing project; two
projects sharing same files.
2. Consider trying to load from a backup.
3. Usually best to send to the CCPN developers (email the JISC list:(CCPNMR@JISCMAIL.AC.UK) rather than to fix by yourself. Editing XML files is “dangerous” unless you know what you're doing.
Key already in use: "Read topObj with guid conflicts with existing topObj: <topObjectGuid>"
1. This can happen if your computer crashes or the disk is full mid-save. Can also occur
if a project was saved inside / on top of an existing project; two
projects sharing same files.
2. Consider trying to load from a backup.
3. Usually best to send to the CCPN developers rather than to fix by yourself. Editing XML files is “dangerous” unless you know what you're doing.
Fitting Error
Can be ignored if Analysis still functions and the data fit that failed was not important (e.g. a noise peak).
May occur if the data being fitted bears no resemblance to the function being used. Choosing a different fit function may help.
Can occur if the number of data points is too small to fit a curve. Consider adding more data points or removing analytic groups from the fit that wouldn't be expected to work in any case.
Usually a problem with the data being fitted rather than the fitting routine. If the data really should fit, double check the X, Y values and if they seem sane contact the CCPN developers (email the JISC list:(CCPNMR@JISCMAIL.AC.UK).
Tcl/OpenGL errors
If there is a long error trace send this to CCPN developers (email the JISC list: (CCPNMR@JISCMAIL.AC.UK), otherwise restart Analysis and try again. Some failures are sporadic and only indirectly related to CCPN, so they may not happen again.
Consider updating to the latest OpenGL driver software for your graphics card (e.g. NVIDIA or ATI).
If there are regular failures consider switching to a different graphics driver: switch between OpenGL & Tk (slower) using M: Project: Preferences: User Options, {Main Options} and restart program.
Determine if the problem is reproducible. And if so report what happens to the CCPN developers. Bear in mind that not much can be done unless there is a good error trace and/or the problem is reproducible on the developers' systems.