Skip to content

Commit 6203e56

Browse files
committed
Tidy up issues.md and rename to troubleshooting.md. Fix reference.
1 parent b419ff3 commit 6203e56

File tree

3 files changed

+185
-173
lines changed

3 files changed

+185
-173
lines changed

coredev/getting-started-with-development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ cd ./plone6devel
4949
./bootstrap.sh
5050
```
5151

52-
If you run into issues in this process, please see {doc}`issues`.
52+
If you run into issues in this process, please see {doc}`troubleshooting`.
5353

5454
This will run for a long time if it is your first pull (approximately 20 minutes).
5555
Once that is done pulling down eggs, you can start your new instance with:

coredev/issues.md

Lines changed: 0 additions & 172 deletions
This file was deleted.

coredev/troubleshooting.md

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description": "Troubleshooting development issues in Plone"
5+
"property=og:description": "Troubleshooting development issues in Plone"
6+
"property=og:title": "Troubleshooting development issues in Plone"
7+
"keywords": "Troubleshooting, development issues, Plone"
8+
---
9+
10+
# Troubleshooting
11+
12+
This chapter describes how to troubleshoot development issues in Plone.
13+
14+
## Buildout issues
15+
16+
Buildout can be frustrating for those unfamiliar with parsing through autistic robot language.
17+
18+
These errors are almost always a quick fix, and a little bit of understanding goes a long way.
19+
20+
21+
### Errors running `bootstrap.py`
22+
23+
You may not even get to running buildout, and then you will already have an error.
24+
Let's take this one for example:
25+
26+
```console
27+
File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/pkg_resources.py", line 556, in resolve
28+
raise VersionConflict(dist,req) # XXX put more info here
29+
pkg_resources.VersionConflict: (zc.buildout 1.5.1 (/usr/local/lib/python2.6/site-packages/zc.buildout-1.5.1-py2.6.egg), Requirement.parse('zc.buildout==1.5.2'))
30+
```
31+
32+
Buildout has simply noticed that the version of buildout required by the file `bootstrap.py` you are trying to run does not match the version of buildout in your Python library.
33+
34+
In the error above, your system has buildout 1.5.1 installed and the `bootstrap.py` file wants to run with 1.5.2.
35+
36+
To fix, you have a couple options.
37+
38+
First, you can force buildout to run with the version you already have installed by invoking the version tag.
39+
40+
This tells your Plone `bootstrap.py` file to play nicely with the version that you already have installed.
41+
42+
In the case of the error pasted above, that would be:
43+
44+
```shell
45+
python bootstrap.py --version=1.5.1
46+
```
47+
48+
I personally know that versions 1.4.4, 1.5.1, and 1.5.2 all work this way.
49+
50+
The other option is to delete your current egg and force the upgrade.
51+
In the case of the error above, delete the egg the system currently has, for example:
52+
53+
```shell
54+
rm -rf /usr/local/lib/python2.6/site-packages/zc.buildout-1.5.1-py2.6.egg
55+
```
56+
57+
When you rerun bootstrap, it will look for the buildout of the egg, note that there isn't one, and then go fetch a new egg in the version that it wants for you.
58+
59+
Do one of those and re-run bootstrap.
60+
61+
One other thing of note is that running bootstrap effectively ties that Python executable and all of its libraries to your buildout.
62+
If you have several Python installs, and want to switch which Python is tied to your buildout, simply rerun `bootstrap.py` with the new Python (and then rerun buildout).
63+
You may get the same error above again, but now that you know how to fix it, you can spend that time drinking beer instead of smashing your keyboard.
64+
65+
Hooray!
66+
67+
68+
### When `mr.developer` is unhappy
69+
70+
`mr.developer` is never unhappy, except when it is.
71+
Although this technically isn't a buildout issue, it happens when running buildout, so I'm putting it under buildout issues.
72+
73+
When working with the dev instance, especially with all the moving back and forth between GitHub and svn, you may have an old copy of a `src` package.
74+
The error looks like:
75+
76+
```console
77+
mr.developer: Can't update package 'Products.CMFPlone' because its URL doesn't match.
78+
```
79+
80+
As long as you don't have any pending commits, you just need to remove the package from {file}`src/` and it will recheck it out for you when it updates.
81+
82+
You can also get such fun errors as:
83+
84+
```console
85+
Link to http://sphinx.pocoo.org/ ***BLOCKED*** by --allow-hosts
86+
```
87+
88+
These are OK to ignore if and only if the lines following it say:
89+
90+
```console
91+
Getting distribution for 'Sphinx==1.0.7'.
92+
Got Sphinx 1.0.7.
93+
```
94+
95+
If buildout ends with warning you that some packages could not be downloaded, then chances are that package wasn't downloaded.
96+
This is bad and could cause all sorts of whack out errors when you start or try to run things because it never actually downloaded the package.
97+
98+
There are two ways to get this error to go away.
99+
The first is to delete all instances of host filtering.
100+
Go through all the files and delete any lines which say `allow-hosts =` and `allow-hosts +=`.
101+
In theory, by restricting which hosts you download from, buildout will go faster.
102+
103+
The point is that they are safely deletable.
104+
105+
The second option is to allow the host that it is pointing to by adding something like this to your `.cfg`:
106+
107+
```cfg
108+
allow-hosts += sphinx.pocoo.org
109+
```
110+
111+
Again, this is only necessary if the package wasn't found in the end.
112+
113+
114+
### `mr.developer` path errors
115+
116+
```console
117+
ERROR: You are not in a path which has mr.developer installed (:file:`.mr.developer.cfg` not found).
118+
```
119+
120+
When running any {command}`./bin/develop` command.
121+
122+
To fix, do:
123+
124+
```shell
125+
ln -s plips/.mr.developer.cfg
126+
```
127+
128+
129+
## Other random issues
130+
131+
```{TODO}
132+
These need to be revalidated
133+
```
134+
135+
136+
### Dirty packages
137+
138+
```console
139+
ERROR: Can't update package 'Some package', because it's dirty.
140+
```
141+
142+
143+
#### Fix
144+
145+
`mr.developer` is complaining because a file has been changed or added, but not committed.
146+
147+
Use `bin/develop update --force`.
148+
Adding `*.pyc *~.nib *.egg-info .installed.cfg *.pt.py *.cpt.py *.zpt.py *.html.py *.egg` to your subversion configuration's `global-ignores` has been suggested as a more permanent solution.
149+
150+
151+
### No module named zope 2
152+
153+
```console
154+
ImportError: No module named Zope2" when building using a PLIP cfg file.
155+
```
156+
157+
Appears to not actually be the case.
158+
Delete {file}`mkzopeinstance.py` from {file}`bin/`, and rerun buildout to correct this if you're finding it irksome.
159+
160+
161+
### Can't open file '/Startup/run.py'
162+
163+
Two possible fixes.
164+
If you use Python 2.4 by mistake, use 2.6 instead.
165+
Or you may need to make sure you run `bin/buildout …` after `bin/develop …`.
166+
Try removing {file}`parts/*`, {file}`bin/*`, {file}`.installed.cfg`, then re-bootstrap and re-run buildout, develop, buildout.
167+
168+
169+
### Missing PIL
170+
171+
{file}`pil.cfg` is included within this buildout to aid in PIL installation.
172+
Run {command}`bin/buildout -c pil.cfg` to install.
173+
This method does not work on Windows.
174+
We're unable to run it by default.
175+
176+
177+
### Modified egg issues
178+
179+
{command}`bin/develop status` is showing that the `Products.CMFActionIcons` egg has been modified, but I haven't touched it.
180+
And this is preventing `bin/develop up` from updating all the eggs.
181+
182+
#### Fix
183+
184+
Edit {file}`~/.subversion/config` and add `eggtest\*.egg` to the list of `global-ignores`.

0 commit comments

Comments
 (0)