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

ModuleNotFoundError: No module named 'tabpy_tools' #360

Closed wilmo79 closed 4 years ago

wilmo79 commented 4 years ago

Environment information:

I have multiple python environments and have validated I'm running from the same consistent virtual environment for this test.

Describe the issue The sample code for tabpy_tools is throwing an error: ModuleNotFoundError: No module named 'tabpy_tools'

To Reproduce I followed the install steps from the TabPy readme. The only difference I can see is that I'm using venv instead of virtualenv. I used pip for all installs I am able to successfully connect to the server with Tableau Desktop and Tableau Prep.

When I run the sample tabpy_tools code (the add(x,y) function), I get the error: ModuleNotFoundError: No module named 'tabpy_tools'

I attempted to install:

\Envs\testenv\Scripts>pip install tabpy_tools ERROR: Could not find a version that satisfies the requirement tabpy_tools (from versions: none) ERROR: No matching distribution found for tabpy_tools **Expected behavior** I expect to have an endpoint that allows for an 'add' on my local server. **Screenshots** **Additional context** May be similar to [issue 264]( https://github.com/tableau/TabPy/issues/264); tried the steps there as well: * updating my PATH variable: didn't appear to affect anything * trying pip install -e tabpy-tools: I get a new error, "ERROR: tabpy-tools is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+)." I don't understand what this means to follow that further. I ran pip list and noticed that none of tabpy_server, tabpy_client, or tabpy_tools appeared as modules. I tried installing tabpy_server explicitly and got tabpy_server but the version that came back was 0.2 (quite old I think?). Thank you for any help/tips!
0golovatyi commented 4 years ago

A few notes:

  1. Installation instructions are at https://github.com/tableau/TabPy/blob/master/docs/server-install.md
  2. You only need to install TabPy from local folder if you making code changes in the package
  3. tabpy_server and tabpy_client are old versions of TabPy, you shouldn't use them together with tabpy. It is not recommended to have them installed together.
  4. It is tabpy.tabpy_tools, not tabpy_tools.
wilmo79 commented 4 years ago

Thank you so much! Number 4 was the solution! I'd been struggling with this code for a few days and it appears the sample was updated in the meantime :-).

nw9n commented 4 years ago

what did you type for tabpy.tabpy_tools?

I couldn't make it work

wilmo79 commented 4 years ago

from tabpy.tabpy_tools.client import Client Following the example from here:

https://github.com/tableau/TabPy/blob/master/docs/tabpy-tools.md

Hope that helps! Cheers

On Nov 26, 2019, at 4:44 PM, nw9n notifications@github.com wrote:

 what did you type for tabpy.tabpy_tools?

I couldn't make it work

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.