Python Connection To Oracle

Trying to follow one of those OBE's that demonstrates Oracle database and Python.
I get to step 13:
13 .
Next, synchronize the database:
cd $HOME/mysite
python syncdb

The module should return a database connection but returns an ORA-12170 TNS:connect timeout occured.
There is another OBE demonstrating similar from OOW:
that connects and completes the return as expected.
Python 2.7 is running on OSX machine and Oracle 11.2.2 is running on windows 7 machine.
Any ideas about what the difference in between the two demos such that one is successful and the other is not?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
>>ORA-12170 TNS:connect timeout occured.

99.999% of the time this is a firewall/network blocking the connection to the database.

I know nothing about Python but I have an educated guess why one works and the other doesn't.

The one that fails seems to be doing a TNS connection using entries in the tnsnames.ora file.  The one that works bypasses that and in the text states "Oracle's Easy Connect connection string".

If this code is running on the database server, it might be doing a direct/bequeth connection and will bypass the firewall.
xoxomosAuthor Commented:
It is not running on the database server, but i suspect such a case was assumed  for purposes of this particular example.
slightwv (䄆 Netminder) Commented:
Check the connection strings and tnsnames.ora entries between the two examples.

Something in the network path to the database server is different and something on the one path is blocking the connection.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
slightwv (䄆 Netminder) Commented:
What was the solution?

I'm curious and it might help others in the future.
xoxomosAuthor Commented:
Those points were basically for the 'educated guess' on why one demo worked and the other did not. Thankfully you responded to what was in the question as originally stated before i edited that part out.  I'm going to try isolating the parts of Python code i believe most related to the connection and google around a bit and possibly post and aske another question.   Will posting here once i get the non-working example working.
Thanks again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.