Użytkownik Sibylle Koczian napisał:
> Hello,
>
> I've installed PyCrypto to get rid of these annoying SimpleCrypt
> warnings, and now I can't start my application at all. Details:
>
> Application made with AppWizard, not yet modified, except for App.py:
>
> class App(dabo.dApp):
> def initProperties(self):
> # Manages how preferences are saved
> self.BasePrefKey = "dabo.app.sibdb_aw"
> self.CryptoKey = "warnungwegtest"
> ...
>
> Opened CxnEditor, deleted and re-entered the database password, test
> successful, saved the .cnxml file. No other changes. Now when I try to
> start the application I get this:
>
> s...@gespenst-xubuntu:~/bin/dabosib/sibdb_aw$ ./sibdb_aw.py
> Traceback (most recent call last):
> File "./sibdb_aw.py", line 37, in<module>
> app.dbConnection = app.getConnectionByName("PostgreSQL 9.0")
> File "/home/sib/src/dabo-trunk/dabo/dApp.py", line 1007, in
> getConnectionByName
> self.dbConnections[connName] = dabo.db.dConnection(ci)
> File "/home/sib/src/dabo-trunk/dabo/db/dConnection.py", line 32, in
> __init__
> self._connection = self._openConnection(**kwargs)
> File "/home/sib/src/dabo-trunk/dabo/db/dConnection.py", line 80, in
> _openConnection
> return
> self._connectInfo.getConnection(forceCreate=self._forceCreate, **kwargs)
> File "/home/sib/src/dabo-trunk/dabo/db/dConnectInfo.py", line 105, in
> getConnection
> return self._backendObject.getConnection(self, **kwargs)
> File "/home/sib/src/dabo-trunk/dabo/db/dbPostgreSQL.py", line 73, in
> getConnection
> self.conn_user, connectInfo.revealPW())
> File "/home/sib/src/dabo-trunk/dabo/db/dConnectInfo.py", line 130, in
> revealPW
> return self.decrypt(self.Password)
> File "/home/sib/src/dabo-trunk/dabo/db/dConnectInfo.py", line 124, in
> decrypt
> return self.Application.decrypt(val)
> File "/home/sib/src/dabo-trunk/dabo/dApp.py", line 854, in decrypt
> return self.Crypto.decrypt(val)
> File "/home/sib/src/dabo-trunk/dabo/lib/SimpleCrypt.py", line 85, in
> decrypt
> padlen = int(decString[0]) + 8
> ValueError: invalid literal for int() with base 10: ''
>
> What is wrong?
>
>
Hi.
You probably must update your old encrypted password in *.cnxml file, like:
from dabo.lib.SimpleCrypt import SimpleCrypt
sc = SimpleCrypt("warnungwegtest")
print sc.encode("my password")
Then write printed result into 'password' element of cnxml file:
<password>this_is_example_M9ldu18yZEhq3dgoGM4ahTE=</password>
--
Regards
Jacek Kałucki
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]