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

SSHTunnelForwarder cannot be found #274

Open
Grosvenorhsc opened this issue Mar 14, 2023 · 1 comment
Open

SSHTunnelForwarder cannot be found #274

Grosvenorhsc opened this issue Mar 14, 2023 · 1 comment

Comments

@Grosvenorhsc
Copy link

Grosvenorhsc commented Mar 14, 2023

I'm trying to run the example given in this article to connect to MySQL via an SSH tunnel in Python, but I'm encountering an error.

Issue Details
When I run the Python script, I get the following error message:

cannot import name 'SSHTunnelForwarder' from 'sshtunnel' (c:\Users\xxxxx\Documents\Python\graph v2\sshtunnel.py)
File "C:\Users\xxxxx\Documents\Python\graph v2\test2.py", line 5, in <module>
    from sshtunnel import SSHTunnelForwarder"

I'm running Windows Server 2019 and Python version 3.7.9, and the following packages:

Package         Version
--------------- --------
bcrypt          4.0.1
cffi            1.15.1
cryptography    39.0.2
easy-install    66.0.2
mock            5.0.1
numpy           1.21.6
pandas          1.3.5
paramiko        3.1.0
pip             23.0.1
pycparser       2.21
PyMySQL         1.0.2
PyNaCl          1.5.0
python-dateutil 2.8.2
pytz            2022.7.1
setuptools      47.1.0
six             1.16.0
sshtunnel       0.4.0
wheel           0.38.4

Steps to Reproduce
Install the packages listed above.
Run the Python script provided in the article.
Observe the error message.

Expected Result
I expected the script to run successfully and connect to MySQL via an SSH tunnel.

Actual Result
The script fails to run and produces an error message.

@wond4
Copy link

wond4 commented Jun 13, 2023

You need to change file (c:\Users\xxxxx\Documents\Python\graph v2\sshtunnel.py) to another name.

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

2 participants