Re: pgAdmin4 - V3 - Problems managing passwords

From: Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>
To: Douglas Reed <douglas(at)fsbtech(dot)com>
Cc: pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: pgAdmin4 - V3 - Problems managing passwords
Date: 2018-05-03 05:37:42
Message-ID: CAFOhELfWTiFGYULirbWNatTYtZP1982-2uk9D31v4jjxLRpRTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

Please follow below instructions to resolve this issue:

pip uninstall pycryptodome
pip install pycrypto

Also, please provide the steps you have followed to install the pgAdmin 4
and when you have installed?

Thanks,
Khushboo

On Wed, May 2, 2018 at 2:07 PM, Douglas Reed <douglas(at)fsbtech(dot)com> wrote:

>
> Hi
>
> I recently installed v3 of pgAdmin4
>
> When setting up the passwords for each of the databases, I kept getting the
> message;
>
> "Object type <class 'str'> cannot be passed to C code"
>
> Although it appeared to save the password
>
> A server reboot later, when I try to to the databases, it prompts for the
> password, when I input the password and click the OK button, I get the
> response "Internal Server Error - click for details"
>
> Clicking to view the errors shows the following in a message box which
> cannot be dismissed
>
> The server encountered an internal error and was unable to complete your
> request. Either the server is overloaded or there is an error in the
> application.
>
> The platform is Ubuntu v16.10
>
>
> The log on the server window reported
>
> /home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/psycopg2/__init__.py:144:
> UserWarning: The psycopg2 wheel package will be renamed from release 2.8;
> in order to keep installing from binary please use "pip install
> psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>. """)
> Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your
> browser.
> 2018-05-02 09:28:17,685: ERROR pgadmin: Object type <class 'str'>
> cannot be passed to C code
> Traceback (most recent call last):
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/__init__.py",
> line 962, in connect
> if password is not None else server.password
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/pgadmin4/pgadmin/utils/crypto.py",
> line 31, in encrypt
> cipher = AES.new(pad(key), AES.MODE_CFB, iv)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/Crypto/Cipher/AES.py",
> line 200, in new
> return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/Crypto/Cipher/__init__.py",
> line 55, in _create_cipher
> return modes[mode](factory, **kwargs)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/Crypto/Cipher/_mode_cfb.py",
> line 230, in _create_cfb_cipher
> cipher_state = factory._create_base_cipher(kwargs)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/Crypto/Cipher/AES.py",
> line 100, in _create_base_cipher
> result = start_operation(c_uint8_ptr(key),
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/Crypto/Util/_raw_api.py",
> line 196, in c_uint8_ptr
> raise TypeError("Object type %s cannot be passed to C code" %
> type(data))
> TypeError: Object type <class 'str'> cannot be passed to C code
> 2018-05-02 09:28:17,698: ERROR werkzeug: Error on request:
> Traceback (most recent call last):
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/werkzeug/serving.py",
> line 270, in run_wsgi
> execute(self.server.app)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/werkzeug/serving.py",
> line 258, in execute
> application_iter = app(environ, start_response)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/app.py",
> line 1997, in __call__
> return self.wsgi_app(environ, start_response)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/app.py",
> line 1985, in wsgi_app
> response = self.handle_exception(e)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/app.py",
> line 1540, in handle_exception
> reraise(exc_type, exc_value, tb)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/_compat.py",
> line 33, in reraise
> raise value
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/app.py",
> line 1982, in wsgi_app
> response = self.full_dispatch_request()
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/app.py",
> line 1614, in full_dispatch_request
> rv = self.handle_user_exception(e)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/app.py",
> line 1517, in handle_user_exception
> reraise(exc_type, exc_value, tb)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/_compat.py",
> line 33, in reraise
> raise value
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/app.py",
> line 1612, in full_dispatch_request
> rv = self.dispatch_request()
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/app.py",
> line 1598, in dispatch_request
> return self.view_functions[rule.endpoint](**req.view_args)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/flask/views.py",
> line 84, in view
> return self.dispatch_request(*args, **kwargs)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/pgadmin4/pgadmin/browser/utils.py",
> line 254, in dispatch_request
> return method(*args, **kwargs)
> File
> "/home/douglas/py3-venv-pgadmin4v3/lib/python3.5/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/__init__.py",
> line 965, in connect
> return internal_server_error(errormsg=e.message)
> AttributeError: 'TypeError' object has no attribute 'message'
>
>
> Python pip freeze
>
> alembic==0.9.9
> Babel==2.5.3
> blinker==1.4
> click==6.7
> extras==1.0.0
> fixtures==3.0.0
> Flask==0.12.2
> Flask-BabelEx==0.9.3
> Flask-Gravatar==0.5.0
> Flask-HTMLmin==1.3.2
> Flask-Login==0.3.2
> Flask-Mail==0.9.1
> Flask-Migrate==2.1.1
> Flask-Paranoid==0.2.0
> Flask-Principal==0.4.0
> Flask-Security==3.0.0
> Flask-SQLAlchemy==2.3.2
> Flask-WTF==0.14.2
> html5lib==1.0.1
> htmlmin==0.1.12
> itsdangerous==0.24
> linecache2==1.0.0
> passlib==1.7.1
> pbr==3.1.1
> pgadmin4==3.0
> psycopg2==2.7.4
> pycryptodome==3.6.1
> pyrsistent==0.14.2
> python-dateutil==2.7.2
> python-editor==1.0.3
> python-mimeparse==1.6.0
> pytz==2018.3
> simplejson==3.13.2
> six==1.11.0
> speaklater==1.3
> SQLAlchemy==1.2.6
> sqlparse==0.2.4
> testtools==2.3.0
> traceback2==1.4.0
> unittest2==1.1.0
> webencodings==0.5.1
> Werkzeug==0.14.1
> WTForms==2.1
>
> Many thanks
>
>
> --
>
>
>
> --
> ____________________________
>
> Douglas Reed (DBA)
> *FSB Technology (UK) Ltd*
>
> 41 Old Street
> <https://maps.google.com/?q=41+Old+Street+%0D%0ALondon,+EC1V+9AE&entry=gmail&source=g>
> London, EC1V 9AE
> <https://maps.google.com/?q=41+Old+Street+London,+EC1V+9AE&entry=gmail&source=g>
>
>
>

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2018-05-03 08:36:28 Re: User account and settings storage in other database than SQLite
Previous Message Peter Palka 2018-05-03 03:50:02 User account and settings storage in other database than SQLite