pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedpgadmin4 python bug?
2+ messages / 2 participants
[nested] [flat]
* pgadmin4 python bug?
@ 2018-04-26 21:45 ml@ft-c.de
0 siblings, 1 reply; 2+ messages in thread
From: ml@ft-c.de @ 2018-04-26 21:45 UTC (permalink / raw)
To: pgsql-admin
Hello
I start pgadmin4 with the following command:
python /usr/local/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
I open the browser
On the website (port 5050), when I open a db connection, I get the the
message:
Object type <type 'unicode'> cannot be passed to C code
This is the terminal-output:
Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your
browser.
2018-04-26 23:28:13,503: ERROR pgadmin: Object type <type
'unicode'> cannot be passed to C code
Traceback (most recent call last):
File
"/usr/local/lib/python2.7/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/__init__.py",
line 962, in connect
if password is not None else server.password
File
"/usr/local/lib/python2.7/site-packages/pgadmin4/pgadmin/utils/crypto.py",
line 31, in encrypt
cipher = AES.new(pad(key), AES.MODE_CFB, iv)
File "/usr/local/lib/python2.7/site-packages/Crypto/Cipher/AES.py",
line 200, in new
return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
File
"/usr/local/lib/python2.7/site-packages/Crypto/Cipher/__init__.py", line
55, in _create_cipher
return modes[mode](factory, **kwargs)
File
"/usr/local/lib/python2.7/site-packages/Crypto/Cipher/_mode_cfb.py",
line 230, in _create_cfb_cipher
cipher_state = factory._create_base_cipher(kwargs)
File "/usr/local/lib/python2.7/site-packages/Crypto/Cipher/AES.py",
line 100, in _create_base_cipher
result = start_operation(c_uint8_ptr(key),
File "/usr/local/lib/python2.7/site-packages/Crypto/Util/_raw_api.py",
line 109, in c_uint8_ptr
raise TypeError("Object type %s cannot be passed to C code" %
type(data))
TypeError: Object type <type 'unicode'> cannot be passed to C code
What should I do?
uname -a
FreeBSD ftc2 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1
Should I write this problem on a FreeBSD mailinglist?
Franz
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pgadmin4 python bug?
@ 2018-04-27 00:07 robert <robert@redcor.ch>
parent: ml@ft-c.de
0 siblings, 0 replies; 2+ messages in thread
From: robert @ 2018-04-27 00:07 UTC (permalink / raw)
To: ml@ft-c.de; pgsql-admin
Hi there,
have you tried to run pgadmin4 with python 3?
robert
On 26.04.2018 23:45, ml@ft-c.de wrote:
> Hello
>
> I start pgadmin4 with the following command:
>
> python /usr/local/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
>
> I open the browser
> On the website (port 5050), when I open a db connection, I get the the
> message:
> Object type <type 'unicode'> cannot be passed to C code
>
> This is the terminal-output:
> Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your
> browser.
> 2018-04-26 23:28:13,503: thon 3?ERROR pgadmin: Object type <type
> 'unicode'> cannot be passed to C code
> Traceback (most recent call last):
> File
> "/usr/local/lib/python2.7/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/__init__.py",
> line 962, in connect
> if password is not None else server.password
> File
> "/usr/local/lib/python2.7/site-packages/pgadmin4/pgadmin/utils/crypto.py",
> line 31, in encrypt
> cipher = AES.new(pad(key), AES.MODE_CFB, iv)
> File "/usr/local/lib/python2.7/site-packages/Crypto/Cipher/AES.py",
> line 200, in new
> return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
> File
> "/usr/local/lib/python2.7/site-packages/Crypto/Cipher/__init__.py", line
> 55, in _create_cipher
> return modes[mode](factory, **kwargs)
> File
> "/usr/local/lib/python2.7/site-packages/Crypto/Cipher/_mode_cfb.py",
> line 230, in _create_cfb_cipher
> cipher_state = factory._create_base_cipher(kwargs)
> File "/usr/local/lib/python2.7/site-packages/Crypto/Cipher/AES.py",
> line 100, in _create_base_cipher
> result = start_operation(c_uint8_ptr(key),
> File "/usr/local/lib/python2.7/site-packages/Crypto/Util/_raw_api.py",
> line 109, in c_uint8_ptr
> raise TypeError("Object type %s cannot be passed to C code" %
> type(data))
> TypeError: Object type <type 'unicode'> cannot be passed to C code
>
> What should I do?
>
> uname -a
> FreeBSD ftc2 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1
>
> Should I write this problem on a FreeBSD mailinglist?
> Franz
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-04-27 00:07 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26 21:45 pgadmin4 python bug? ml@ft-c.de
2018-04-27 00:07 ` robert <robert@redcor.ch>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox