Hi,
I discovered wikipl the other day and it's turning out to be very
useful for a task i am doing. I'm new to python but it seems to work
fine on my Mac Pro but i want to get it to work on one of my group's
servers. Here is the error i get when i try to import a function. Can
you help?
Many thanks,
Jonathan
mandarin{marchini}% uname -a
Linux
mandarin.stats.ox.ac.uk 2.6.35.14-106.fc14.x86_64 #1 SMP Wed Nov
23 13:07:52 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
mandarin{marchini}% python
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import wikipl
>>> from wikipl import Convert_impute2_to_PEDMAP
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wikipl/__init__.py", line 356, in import_hook
import_WPL_article(toImport, 1)
File "wikipl/__init__.py", line 318, in import_WPL_article
wikipl_connect()
File "wikipl/__init__.py", line 72, in wikipl_connect
site = mwclient.Site(siteDomain, path = sitePath)
File "wikipl/mwclient/client.py", line 92, in __init__
self.site_init()
File "wikipl/mwclient/client.py", line 100, in site_init
siprop = 'general|namespaces', uiprop = 'groups|rights')
File "wikipl/mwclient/client.py", line 165, in api
info = self.raw_api(action, **kwargs)
File "wikipl/mwclient/client.py", line 248, in raw_api
json_data = self.raw_call('api', data).read()
File "wikipl/mwclient/client.py", line 223, in raw_call
url, data = data, headers = headers)
File "wikipl/mwclient/http.py", line 226, in post
path, headers, data)
File "wikipl/mwclient/http.py", line 161, in post
return self.request('POST', host, path, headers, data)
File "wikipl/mwclient/http.py", line 94, in request
self._conn.request(method, path, headers = headers)
File "/usr/lib64/python2.7/httplib.py", line 946, in request
self._send_request(method, url, body, headers)
File "/usr/lib64/python2.7/httplib.py", line 986, in _send_request
self.putheader(hdr, value)
File "/usr/lib64/python2.7/httplib.py", line 924, in putheader
str = '%s: %s' % (header, '\r\n\t'.join(values))
TypeError: sequence item 0: expected string, int found