ctypes error on Windows

Fredrik Lundh fredrik at pythonware.com
Fri Sep 5 02:34:53 EDT 2008


Mike Hostetler wrote:

> I'm working on a script with the most excellent uTibyLib library.  The script works just fine on Mac, but on Windows I get this:
> 
>  File "findtables.py", line 82, in cleanHTML
>    return  str(tidy.parseString(decentDoc))
>  File "c:\Python24\Lib\site-packages\tidy\lib.py", line 207, in parseString
>    doc = self._create(**kwargs)
>  File "c:\Python24\Lib\site-packages\tidy\lib.py", line 183, in _create
>    doc = _Document()
>  File "c:\Python24\Lib\site-packages\tidy\lib.py", line 135, in __init__
>    self.cdoc = _tidy.Create()
>  File "c:\Python24\Lib\site-packages\tidy\lib.py", line 46, in __getattr__
>    return getattr(self.lib, name)
>  File "C:\Python24\Lib\site-packages\ctypes\__init__.py", line 353, in __getatt
>    func = self.__getitem__(name)
>  File "C:\Python24\Lib\site-packages\ctypes\__init__.py", line 358, in __getite
>    func = self._FuncPtr((name_or_ordinal, self))
> AttributeError: function 'Create' not found
> 
> I do have the tidy.dll installed (if I didn't, I couldn't even import the tidy module).

typing the following into the Python interpreter might give you some 
more clues:

     >>> import _tidy
     >>> _tidy.__file__
     >>> dir(_tidy)

</F>




More information about the Python-list mailing list