establishing a connection fails due to "ImportError: cannot import name util"

Bug #1447123 reported by Karl-Philipp Richter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-workbench (Ubuntu)
New
Undecided
Unassigned

Bug Description

At start the following exception is printed to `stdout`:

    ['un\\"o', 'do``s']
    Traceback (most recent call last):
      File "/usr/lib/mysql-workbench/modules/wb_admin_ssh.py", line 44, in <module>
        import paramiko
      File "/usr/lib/python2.7/dist-packages/paramiko/__init__.py", line 30, in <module>
        from paramiko.transport import SecurityOptions, Transport
      File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 49, in <module>
        from paramiko.dsskey import DSSKey
      File "/usr/lib/python2.7/dist-packages/paramiko/dsskey.py", line 26, in <module>
        from Crypto.PublicKey import DSA
    ImportError: cannot import name DSA
    Warning! Can't use connect with timeout in paramiko None
    Ready.

    Traceback (most recent call last):
      File "/usr/share/mysql-workbench/sshtunnel.py", line 32, in <module>
        import paramiko
      File "/usr/lib/python2.7/dist-packages/paramiko/__init__.py", line 30, in <module>
        from paramiko.transport import SecurityOptions, Transport
      File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 32, in <module>
        from paramiko import util
    ImportError: cannot import name util

When a connection is established a dialog "Cannot Connect to Database Server" is displayed and `** (mysql-workbench-bin:25631): WARNING **: Tunnel manager could not be executed` is logged to `stdout`.

`sudo pip install --upgrade paramiko` and `sudo pip install --upgrade pycrypto` don't help.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: mysql-workbench 6.2.3+dfsg-7build1
Uname: Linux 4.0.0-040000-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Apr 22 13:29:41 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-04-02 (19 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Beta amd64 (20150326)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: mysql-workbench
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :
Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

This error occurs due to an error in the `paramiko` python module depending on an error in the `pycrypto` module. Installation of `pycrypto` with `./autogen.sh && ./configure && python setup.py build && sudo python setup.py install` in source root (git commit 7acba5f3a6ff10f1424c309d0d34d2b713233019) and installation of `paramiko` with `python setup.py build && sudo python setup.py install` in the source root (git commit cfeca480db0116c5c8d95ba1aaa9e5e5e02951ed) fixes the issue.

affects: mysql-workbench (Ubuntu) → paramiko (Ubuntu)
affects: paramiko (Ubuntu) → mysql-workbench (Ubuntu)
Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

After reboot I get the error message `No handlers could be found for logger "paramiko.transport"` when I try to establish the stored connection which worked before reboot, so the workaround is very likely incomplete.

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

Ok, that was just because of `mysql-workbench` not saving the chosen connection type (switches back to TCP/IP over SSH after restart), so that connection type might not work (and might have worked before my workaround), but TCP/IP connections now work with the workaround.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.