tableau / TabPy

Execute Python code on the fly and display results in Tableau visualizations:
https://tableau.github.io/TabPy/
MIT License
1.56k stars 598 forks source link

Error when connecting in tableau desktop #351

Closed jesspencer closed 4 years ago

jesspencer commented 5 years ago

Environment information:

Describe the issue An error occurred while communicating with the external service. Tableau is unable to connect to the service. Verify that the service is running and that you have access privileges.

To Reproduce Steps to reproduce the behavior: what commands to run, what files to modify, where to look for an error.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context pip virtual env successfully setup, pip install tabpy, pip install tapby-server, closed tableau desktop and tested the connection when I get error message Capture

0golovatyi commented 5 years ago

@jesspencer You don't need to install tabpy-server anymore. The commands should be

pip install tabpy
tabpy

After TabPy started you should be able to connect to it with the machine name and port (by default port is 9004, you can find it in TabPy log file or console output). To confirm you can reach running instance try http://<machine name>:9004/info in a web browser.

0golovatyi commented 5 years ago

@jesspencer Are you still experiencing the issue?

jesspencer commented 5 years ago

Hi, Thanks for following up. I am still not able to run tabpy.

So far, 1) I have created a virtual environment and activated it (using my anaconda prompt ) 2) installed tabpy using pip install tabpy tabpy 3) check that the server is running in the browser gives me nothing 4) testing the connection in tableau I get the error “error occurred while communicating ... verify that the service is running and that you have access privileges “

Best,

Jess

Sent from my iPhone

On Oct 22, 2019, at 12:19 PM, Oleksandr Golovatyi notifications@github.com wrote:

@jesspencer Are you still experiencing the issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

0golovatyi commented 5 years ago

So from what you mentioned for 3), I understand it either server was not started or it is running on some different port. When you start TabPy with tabpy command you should see some output for the server with the parameter information. There will be a line for the port number (usually the very first one). Something like this:

C:\Temp>tabpy
**2019-10-22,11:07:42 [DEBUG] (app.py:app:215): Parameter port set to "9004" from default value**

Confirm the port number first and try http://localhost:<portnumber>/info on the same machine.

jesspencer commented 5 years ago

When I ran ‘pip install tabpy tabpy ‘ Tabpy installed outside of my temp folder. When I cd into tabpy the files in the tabpy repository are there. When I cd into my temp folder, like in your example, tabpy is not there.

Sent from my iPhone

On Oct 22, 2019, at 2:10 PM, Oleksandr Golovatyi notifications@github.com wrote:

So from what you mentioned for 3), I understand it either server was not started or it is running on some different port. When you start TabPy with tabpy command you should see some output for the server with the parameter information. There will be a line for the port number (usually the very first one). Something like this:

C:\Temp>tabpy 2019-10-22,11:07:42 [DEBUG] (app.py:app:215): Parameter port set to "9004" from default value Confirm the port number first and try http://localhost:/info on the same machine.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

0golovatyi commented 5 years ago

@jesspencer You don't need to change folders, pip installs in its packages folder regardless of where you run it from. Just follow the steps at https://github.com/tableau/TabPy/blob/master/docs/server-install.md. Do you see any output when running tabpy command as explained on the page?

jesspencer commented 5 years ago

starting tabpy gives me a permissions error; screen shot attached

On Tue, Oct 22, 2019 at 5:14 PM Oleksandr Golovatyi < notifications@github.com> wrote:

@jesspencer https://github.com/jesspencer You don't need to change folders, pip installs in its packages folder regardless of where you run it from. Just follow the steps at https://github.com/tableau/TabPy/blob/master/docs/server-install.md. Do you see any output when running tabpy command as explained on the page?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tableau/TabPy/issues/351?email_source=notifications&email_token=AJPINAGGL226W33DK3ONG2LQP5UJTA5CNFSM4JAIUHJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB7HKLY#issuecomment-545158447, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPINAGTWXD5U66NDOPQ2T3QP5UJTANCNFSM4JAIUHJQ .

0golovatyi commented 5 years ago

@jesspencer I can't see any screenshot with your last comment. However tabpy may fail on start if you running it from a folder where you don't have create/write access, like c:\. Try something like cd %TEMP% and then tabpy.

jesspencer commented 5 years ago

@0golovatyi

Thanks for the advice of making a tmp folder because of permissions. I made a tmp folder and tried tabpy again and it seemed to start the sever listing on port 9004. I then ran into Windows Defender firewall blocks. So, I then opened a virtual machine and did the installation. The server installed without firewall blocks. I tried going to browser and doing the http://localhost plus port number 9004 /info and I am not able to get anywhere. I try checking the connection in tableau and I receive the error that I got in the very beginning.

0golovatyi commented 5 years ago

What do you see in your browser when you open http://localhost:9004/info on the same machine where TabPy is running?

jesspencer commented 5 years ago

“This page can’t be displayed error”

Sent from my iPhone

On Oct 26, 2019, at 11:23 AM, Oleksandr Golovatyi notifications@github.com wrote:

What do you see in your browser when you open http://localhost:9004/info on the same machine where TabPy is running?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

nmannheimer commented 5 years ago

Hi @jesspencer thanks for sharing these details! Does the VM where you are running TabPy have network access to the machine where you are running the browser/Tableau? Are you running the browser in the VM? It could be that the TabPy server is running in an environment that Tableau can't access over the network.

If that isn't the issue, would you be open to reaching out to me at nmannheimer@tableau.com and we could look at setting up a call?

jesspencer commented 4 years ago

I was able to install tabpy on another machine in which I was able to set my own windows firewall settings; the installation worked fine. On the other machine, I successfully confirmed tabpy server was listening by going to http://mycomputername:9004/info where I saw the json tableau server information. Thanks for your help; thanks for being responsive.

On Mon, Oct 28, 2019 at 10:17 PM nmannheimer notifications@github.com wrote:

Hi @jesspencer https://github.com/jesspencer thanks for sharing these details! Does the VM where you are running TabPy have network access to the machine where you are running the browser/Tableau? Are you running the browser in the VM? It could be that the TabPy server is running in an environment that Tableau can't access over the network.

If that isn't the issue, would you be open to reaching out to me at nmannheimer@tableau.com and we could look at setting up a call?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tableau/TabPy/issues/351?email_source=notifications&email_token=AJPINAAJHJANGKAFG3J3YNLQQ6MMVA5CNFSM4JAIUHJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECPAA5A#issuecomment-547225716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPINAAMAT2545JS3DJRIK3QQ6MMVANCNFSM4JAIUHJQ .