Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49136

Re: Unable to import NHunspell.dll using ctypes in Python

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'subject:Python': 0.06; 'linux,': 0.07; '__init__': 0.09; 'executable': 0.09; 'similar,': 0.09; 'subject:using': 0.09; 'windows': 0.15; "dll's": 0.16; 'elf': 0.16; 'mark.': 0.16; 'subject:ctypes': 0.16; 'subject:import': 0.16; 'unlikely': 0.16; 'files.': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'file,': 0.19; 'install': 0.23; 'header:User-Agent:1': 0.23; 'error': 0.23; 'dll': 0.24; 'header': 0.24; '15,': 0.26; 'skip:" 40': 0.26; 'downloaded': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "i'm": 0.30; 'getting': 0.31; 'ctypes': 0.31; 'question:': 0.31; 'file': 0.32; 'this.': 0.32; 'linux': 0.33; '(most': 0.33; 'skip:_ 10': 0.34; 'except': 0.35; 'but': 0.35; 'version': 0.36; 'really': 0.36; 'useful': 0.36; 'thanks': 0.36; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'new': 0.61; "you're": 0.61; 'back': 0.62; 'email addr:gmail.com': 0.63; 'information': 0.63; 'within': 0.65; 'reply': 0.66; 'frequently': 0.68; 'invalid': 0.68; 'received:74.208': 0.68; 'special': 0.74; 'received:74.208.4.194': 0.84; 'subject:skip:N 10': 0.84
Date Tue, 25 Jun 2013 03:45:42 -0400
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6
MIME-Version 1.0
To python-list@python.org
Subject Re: Unable to import NHunspell.dll using ctypes in Python
References <23e633db-afbe-4edc-9291-5a9e242e86d0@googlegroups.com> <mailman.3799.1372144029.3114.python-list@python.org> <4c1ad40e-cc53-4414-8822-101d5591f598@googlegroups.com>
In-Reply-To <4c1ad40e-cc53-4414-8822-101d5591f598@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:1tAoaMOmMtj37B+lTUcBDVYytUTpu0Ltm6fs968kXz1 +LscCyQWkqHeWyICTIGQ8gdxuJ5k9IDQ0PCVPQ3dtiiS1GhLK7 hcXEeUd86YXj8RIYNCqYHWFbEhofrougiG9p+PCIM5lbEq/a5h 1sNMKGXOaseuomALscI4CQ3oY0gxK+CpA5yr8vH6Vzc6+0upYR hhT5MVMrV+S/o9UIt7LKjLJor1PcfsRcfxzMMiXQSKVNZRpn/1 7VEL2aSYWe/UHPT+LT//7sxVN7FuyMcqMQ5df+9mmxS2C3nKtP +lmD061Qvj2L4KUB5WR9/7GoiliyHFgtZ6z3hrhCoTZ0EnSd3w AkWnn94BWUF/wK6d1qCM=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3801.1372146364.3114.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1372146364 news.xs4all.nl 15892 [2001:888:2000:d::a6]:38134
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:49136

Show key headers only | View raw


On 06/25/2013 03:32 AM, akshay.ksth@gmail.com wrote:
> Thanks for the reply Mark. I did what you suggested.
> But now I'm getting an error like this.
>
> Traceback (most recent call last):
>    File "start.py", line 15, in <module>
>      hunspell = cdll.LoadLibrary('/home/kuro/Desktop/notepad/Hunspellx64.dll')
>    File "/usr/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
>      return self._dlltype(name)
>    File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
>      self._handle = _dlopen(self._name, mode)
> OSError: /home/kuro/Desktop/notepad/Hunspellx64.dll: invalid ELF header
>
> I am really new to using ctypes and dll files. Can you please guide me out.
>

This is why it's frequently useful to supply the information with your 
original question:  what version of Python, and what OS.

You're on Linux or similar, and dll's are the way a Windows executable 
is named.  So chances are you're trying to install a Windows dll on 
Linux, which is unlikely to work except under very special circumstances 
(eg. within WINE).

Try going back to where you downloaded this file, and see if you can get 
the one for your OS.

-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Unable to import NHunspell.dll using ctypes in Python akshay.ksth@gmail.com - 2013-06-24 23:23 -0700
  Re: Unable to import NHunspell.dll using ctypes in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-25 08:07 +0100
    Re: Unable to import NHunspell.dll using ctypes in Python akshay.ksth@gmail.com - 2013-06-25 00:32 -0700
      Re: Unable to import NHunspell.dll using ctypes in Python Dave Angel <davea@davea.name> - 2013-06-25 03:45 -0400
      Re: Unable to import NHunspell.dll using ctypes in Python Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-06-25 09:54 +0200
      Re: Unable to import NHunspell.dll using ctypes in Python Dave Angel <davea@davea.name> - 2013-06-25 09:55 -0400
  Re: Unable to import NHunspell.dll using ctypes in Python akshay.ksth@gmail.com - 2013-06-25 00:58 -0700
    Re: Unable to import NHunspell.dll using ctypes in Python Dave Angel <davea@davea.name> - 2013-06-25 10:05 -0400
  Re: Unable to import NHunspell.dll using ctypes in Python akshay.ksth@gmail.com - 2013-06-25 01:04 -0700
    Re: Unable to import NHunspell.dll using ctypes in Python Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-06-25 10:32 +0200
  Re: Unable to import NHunspell.dll using ctypes in Python akshay.ksth@gmail.com - 2013-06-25 07:52 -0700

csiph-web