Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBqvB-0004ls-5L for pgsql-admin@arkaria.postgresql.org; Fri, 27 Apr 2018 00:07:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fBqv9-0003tM-J1 for pgsql-admin@arkaria.postgresql.org; Fri, 27 Apr 2018 00:07:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBqv9-0003tC-84 for pgsql-admin@lists.postgresql.org; Fri, 27 Apr 2018 00:07:27 +0000 Received: from susanne.redcor.ch ([178.63.103.72]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBqv5-0000Gu-OQ for pgsql-admin@postgresql.org; Fri, 27 Apr 2018 00:07:25 +0000 Received: from [192.168.0.220] (84-72-41-4.dclient.hispeed.ch [84.72.41.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: robert@redcor.ch) by susanne.redcor.ch (Postfix) with ESMTPSA id 03AACA0181; Fri, 27 Apr 2018 02:07:19 +0200 (CEST) Subject: Re: pgadmin4 python bug? To: ml@ft-c.de, pgsql-admin@postgresql.org References: From: robert Message-ID: Date: Fri, 27 Apr 2018 02:07:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 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 '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 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 >