]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/autosetup_python_warnings.mdwn
google search plugin: use https for the search
[ikiwiki.git] / doc / bugs / autosetup_python_warnings.mdwn
1 ## What I did
2
3 A friend reported this, and I'm seeing it too. With 3.20140916, on
4 a system with Python 2.7 and 3.4 (and little else) installed, I
5 tried to run the auto.setup:
6
7     :; ikiwiki --setup /etc/pkg/ikiwiki/auto.setup
8     What will the wiki be named? Import Errors
9     What revision control system to use? git
10     Which user (wiki account or openid) will be admin? schmonz
11     
12     
13     Setting up Import Errors ...
14     Importing /Users/schmonz/ImportErrors into git
15     Initialized empty shared Git repository in /Users/schmonz/ImportErrors.git/
16     Initialized empty Git repository in /Users/schmonz/ImportErrors/.git/
17     [master (root-commit) 20b1128] initial commit
18      1 file changed, 1 insertion(+)
19      create mode 100644 .gitignore
20     Counting objects: 3, done.
21     Writing objects: 100% (3/3), 230 bytes | 0 bytes/s, done.
22     Total 3 (delta 0), reused 0 (delta 0)
23     To /Users/schmonz/ImportErrors.git
24      * [new branch]      master -> master
25     Directory /Users/schmonz/ImportErrors is now a clone of git repository /Users/schmonz/ImportErrors.git
26     Traceback (most recent call last):
27       File "/usr/pkg/lib/ikiwiki/plugins/rst", line 45, in <module>
28         from proxy import IkiWikiProcedureProxy
29       File "/usr/pkg/lib/ikiwiki/plugins/proxy.py", line 41, in <module>
30         import xml.parsers.expat
31       File "/usr/pkg/lib/python3.4/xml/parsers/expat.py", line 4, in <module>
32         from pyexpat import *
33     ImportError: No module named 'pyexpat'
34     
35     
36     Creating wiki admin schmonz ...
37     Choose a password:
38     [...]
39
40 ## What I expected
41
42 I expected to get a basic site.
43
44 ## What happened instead
45
46 I got a basic site with some Python error messages.
47
48 ## Likely fix
49
50 Looks like `proxy.py` needs the trick from [[!debbug 637604]] so
51 that it can defer a few imports (at least `xml.parsers.expat` and
52 the XML-RPC libs) until the methods using them are called. --[[schmonz]]