A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/078503.html below:

call of non-function (type string) error

call of non-function (type string) errorKalle Svensson kalle at gnupung.net
Wed Apr 11 15:38:37 EDT 2001
Sez Graham Guttocks:
> >>> CIPHER = "DES3"
> >>> Crypto = __import__("Crypto.Cipher.%s" % CIPHER)
> >>> cipher = getattr(Crypto.Cipher, CIPHER)
> >>> cipherobj = cipher.new(KEY, CIPHER+".CBC", IV)
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.0/site-packages/Crypto/Ciphers.py", line 84, in
> __init__
>     self.instance = self.C_new(key,mode,IV)
> TypeError: an integer is required

Perhaps try
>>> cipherobj = cipher.new(KEY, cipher.CBC, IV)
or
>>> cipherobj = cipher.new(KEY, Crypto.CBC, IV)

I have no idea what module you're using, haven't read the previous messages
in the thread and so on.  This is just a guess...

Peace,
  Kalle
-- 
Email: kalle at gnupung.net     | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD
 [ Not signed due to lossage.  Blame Microsoft Outlook Express. ]


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4