Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alternative to crypt on windows #50

Closed
mariuz opened this issue Apr 14, 2014 · 5 comments
Closed

alternative to crypt on windows #50

mariuz opened this issue Apr 14, 2014 · 5 comments

Comments

@mariuz
Copy link
Contributor

mariuz commented Apr 14, 2014

Carlos installed this driver with all versions of Python from 3.x and always shows this error

File “H:\python33\lib\site-packages\firebirdsql\wireprotocol.py”, line 523, in _op_attach
s = self.str_to_bytes(crypt.crypt(self.password, ’9z’)[2:])
AttributeError: ‘NoneType’ object has no attribute ‘crypt’

Win XP SP3
Python 3.x
Firebird 2.5.x

@mariuz
Copy link
Contributor Author

mariuz commented Apr 14, 2014

Some alternative would be

pycrypto or cryptography

I like more pycrypot (pure python) , cryptography requires openssl libs
https://github.com/pyca/cryptography/blob/master/docs/installation.rst

@nakagami
Copy link
Owner

Thanks !

I have fixed if crypt module is not found, send password as plain text, like IB6 (version 10 protocol)

Please checkout current master branch and test it.

@jtraslavi
Copy link

Hello, today I installed the latest version of pyfirebirdsql,

the error

AttributeError: ‘NoneType’ object has no attribute ‘crypt’

no longer exits, now sends the following :

Traceback (most recent call last):
File "H:\proypy\prueba\test.py", line 13, in
wire_crypt=True)
File "H:\python33\lib\site-packages\firebirdsql__init__.py", line 62, in connect
return Connection(**kwargs)
File "H:\python33\lib\site-packages\firebirdsql\fbcore.py", line 582, in init
self._op_attach()
File "H:\python33\lib\site-packages\firebirdsql\wireprotocol.py", line 516, in _op_attach
enc_pass = self.str_to_bytes(get_crypt(self.password))
File "H:\python33\lib\site-packages\firebirdsql\wireprotocol.py", line 158, in str_to_bytes
return s.encode(charset_map.get(self.charset, self.charset))
AttributeError: 'NoneType' object has no attribute 'encode'

I use win xp,
firebird 2.5,
python 3.3 y the library
pyfirebirdsql-master ...

Thanks for your help ...

nakagami added a commit that referenced this issue Apr 15, 2014
@nakagami
Copy link
Owner

Oh, Sorry jtraslavi and mariz.
Now I fix encode() error.

Please (re) try the latest master jtrasalv

@mariuz mariuz closed this as completed Apr 15, 2014
@jtraslavi
Copy link

It worked, I am in the work of passing a system made in php (win xp, firebird 2.5, php 5.4 pdo) to python (win xp, firebird 2.5, python 3.3, pyfirebirdsql) and will go commenting on developments in relation to the database . Thanks for your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants