You are not logged in.
Pages: 1
There's this great personal wiki program called WikidPad that I've started using for organisational purposes.
However, I have to run the win32 version in wine, because I can't get the linux version to work.
I definitely have the dependencies installed, but when I run the program, I get this error message:
dave@kaminoitte:/var/abs/local/wikidPad$ python WikidPad.py
Traceback (most recent call last):
File "WikidPad.py", line 22, in ?
from pwiki.PersonalWikiFrame import PersonalWikiFrame
File "/usr/lib/python2.4/site-packages/pwiki/PersonalWikiFrame.py", line 12, in ?
import Configuration
File "/usr/lib/python2.4/site-packages/pwiki/Configuration.py", line 22, in ?
from StringOps import utf8Enc, utf8Dec, mbcsDec, strToBool
File "/usr/lib/python2.4/site-packages/pwiki/StringOps.py", line 66, in ?
import encodings.mbcs
File "/usr/lib/python2.4/encodings/mbcs.py", line 14, in ?
class Codec(codecs.Codec):
File "/usr/lib/python2.4/encodings/mbcs.py", line 18, in Codec
encode = codecs.mbcs_encode
AttributeError: 'module' object has no attribute 'mbcs_encode'
Would someone more experienced with python care to hazard a guess as to what's going on?
.oO Komodo Dave Oo.
Offline
The answer to the question "what's going on?" is quite simple: someone tries to use something (probably a function) called codecs.mbcs_encode, that just doesn't exist in the codecs module. That's why Python prints out this message.
I've just checked it on my Python (2.4.1): there's no codecs.mbcs_encode in the codecs module. (You can check it for yourself; just do:
$ python
>>> import codecs
>>> dir(codecs)
and try to find anything called mbcs_encode.)
The most important questions here are "what is this codecs.mbcs_encode, what it should be, and why it's not there?". Well... I didn't know anything about it, so I took a look at the Python's documentation. And here's what I've found there:
mbcs dbcs Unicode string Windows only: Encode operand according to the ANSI codepage (CP_ACP)
So I think that this mbcs is a Windows-specific feature, that isn't available in Python run on Linux system. Therefore it's impossible to run this program on Linux.
Offline
I have to say TPJ, if there were awards for 'post of the month', I'd nominate you for one
Seriously, not only did you answer my question, but you answered it incredibly clearly, and in sufficient detail that in the future I can rectify similar problems myself.
Many thanks, your response is very much appreciated =o)
.oO Komodo Dave Oo.
Offline
Yeah, something I've started getting used to is that I can't rely on modules being cross platform. In some ways, it's great that there are modules that utilise OS specific functionality, but it does mean you have to pay attention to what works on what.
The codecs doc page with information about which encodings are possible (and on which platform) can be found here.
If you look at the module index you'll see just how many are OS specific.
Offline
If you look at the module index you'll see just how many are OS specific.
Jesus, WAY more than I thought :?
Loads of Mac ones in particular...
.oO Komodo Dave Oo.
Offline
Ok, I got round the original problem by editing one of the python files.
Now there's a new issue; despite me having installed sqlite3, the python script doesn't seem to acknowledge it:
python WikidPad.py
Traceback (most recent call last):
File "WikidPad.py", line 20, in ?
from pwiki.PersonalWikiFrame import PersonalWikiFrame
File "/var/abs/local/wikidPad/lib/pwiki/PersonalWikiFrame.py", line 15, in ?
from WikiData import *
File "/var/abs/local/wikidPad/lib/pwiki/WikiData.py", line 26, in ?
import sqlite3api as sqlite
File "/var/abs/local/wikidPad/lib/pwiki/sqlite3api.py", line 8, in ?
import SqliteThin3
File "/var/abs/local/wikidPad/lib/pwiki/SqliteThin3.py", line 84, in ?
_dll = cdll.sqlite3
File "/usr/lib/python2.4/site-packages/ctypes/__init__.py", line 407, in __getattr__
dll = self._dlltype(name)
File "/usr/lib/python2.4/site-packages/ctypes/__init__.py", line 319, in __init__
self._handle = _LoadLibrary(self._name)
OSError: sqlite3: cannot open shared object file: No such file or directory
Any suggestions?
.oO Komodo Dave Oo.
Offline
Just a guess: Maybe you need python-pysqlite from extra repo.
Offline
Just a guess: Maybe you need python-pysqlite from extra repo.
I thought the same Snowman, but I installed that alongside sqlite3, and still no joy =o(
.oO Komodo Dave Oo.
Offline
There are also some pysqlite* packages in AUR. You could check them out too.
[EDIT]
One of them is the same as python-pysqlite. You might want to check the others.
Offline
Thank you for the info Snowman, I'll go try out the others now
.oO Komodo Dave Oo.
Offline
Still no joy...
This is really odd; I've got everything I need I think... yet why does it not acknowledge SQlite3 even though it's installed?
.oO Komodo Dave Oo.
Offline
is it possible that its using the wrong version of sqllite? An example is in java requiring Java 1.5, sometimes your PATH is such that it finds Java 1.4 first and you get really confused.....
Ok, that only happens to windows users, but you get my point... just a thought.
Dusty
Offline
There are 3 versions of pysqlite in the aur (well, one is in extra) - pysqlite2 is for sqlite3, pysqlite is for sqlite2, and pysqlite-legacy is v1.0.6 for sqlite2, but is required by supybot (because the head dev doesn't want to upgrade his code)
Offline
is it possible that its using the wrong version of sqllite? An example is in java requiring Java 1.5, sometimes your PATH is such that it finds Java 1.4 first and you get really confused.....
I know what you mean Dusty, but I don't think I have multiple versions of sqlite, sadly:
local/libgda 1.2.2-3
data abstraction layer; with mysql, pgsql, ldap, xml, sqlite providers
local/python-pysqlite 2.0.5-2
A Python DB-API 2.0 interface for the SQLite embedded relational database engine
local/sqlite3 3.2.8-1
A C library that implements an SQL database engine
There are 3 versions of pysqlite in the aur (well, one is in extra) - pysqlite2 is for sqlite3, pysqlite is for sqlite2, and pysqlite-legacy is v1.0.6 for sqlite2, but is required by supybot (because the head dev doesn't want to upgrade his code)
Roger that; I have got the correct packages installed then, neh?
Hmmph....
I'm running WikidPad in wine atm by adding mscrvt.dll and python24.dll in winecfg, but it's irritating to use a win32 version of software when you know it *should* work in 'nux. :evil:
.oO Komodo Dave Oo.
Offline
Pages: 1