Skip to content

Unable to import tableausdk.Server #2866

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

Closed
AlexandreOuellet opened this issue Oct 11, 2018 · 0 comments
Closed

Unable to import tableausdk.Server #2866

AlexandreOuellet opened this issue Oct 11, 2018 · 0 comments

Comments

@AlexandreOuellet
Copy link

AlexandreOuellet commented Oct 11, 2018

Environment data

  • VS Code version: 1.28.0
  • Extension version (available under the Extensions sidebar): 2018.9.0
  • OS and version: Windows 10 Enterprise
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda and Python 3.6.5
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda (base)
  • Relevant/affected Python packages and their versions: TableauSDK (Found here : https://onlinehelp.tableau.com/current/api/sdk/en-us/help.htm#SDK/tableau_sdk_installing.htm)

Actual behavior

after multiple error of
"Unable to open '<frozen importlib._bootstrap>': File not found
(file:///C:/users/oueal/documents/projets/airflow_plugins/<frozen importlib.bootstrap>)."

I get an OSError: [WinError 127]

Expected behavior

I should be able to import and use tableauSDK.Server module and pacakges

Steps to reproduce:

  1. Install the tableauSDK as per the instruction on https://onlinehelp.tableau.com/current/api/sdk/en-us/help.htm#SDK/tableau_sdk_installing.htm
  2. in a test.py file, simply do import tableausdk.Server and notice the multiple error and OSError

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

##########Linting Output - pylint##########
##########Linting Output - pylint##########
************* Module airflow_plugins.test
1,0,convention,C0304:Final newline missing
1,0,convention,C0111:Missing module docstring
1,0,warning,W0611:Unused import tableausdk.Server

-------------------------------------

Your code has been rated at -20.00/10

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

 INFO no standard startup: panel is active
TMSyntax.ts:47 Overwriting grammar scope name to file mapping for scope source.sql.
Old grammar file: file:///c%3A/Users/oueal/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/sql/syntaxes/sql.tmLanguage.json.
New grammar file: file:///c%3A/Users/oueal/.vscode/extensions/ms-mssql.mssql-1.4.0/syntaxes/SQL.plist
e.register @ TMSyntax.ts:47
TMSyntax.ts:47 Overwriting grammar scope name to file mapping for scope source.yaml.
Old grammar file: file:///c%3A/Users/oueal/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json.
New grammar file: file:///c%3A/Users/oueal/.vscode/extensions/redhat.vscode-yaml-0.0.17/syntaxes/yaml.tmLanguage.json
e.register @ TMSyntax.ts:47
console.ts:136 [Extension Host] Git extension API method 'getGitPath' is deprecated.
t.log @ console.ts:136
3console.ts:136 [Extension Host] Couldn't find tracking branch. Extension will fallback to branch name feature/tableau_operator
9notificationsAlerts.ts:42 Unable to open '&lt;frozen importlib._bootstrap&gt;': File not found (file:///c:/users/oueal/documents/projects/airflow_plugins/&lt;frozen importlib._bootstrap&gt;).

Relevent information

I have included the python debug console output

PS C:\Users\oueal\Documents\Projects\airflow_plugins> cd 'c:\Users\oueal\Documents\Projects\airflow_plugins'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\oueal\AppData\Local\Continuum\anaconda3\python.exe' 'c:\Users\oueal\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd_launcher.py' '49365' 'c:\Users\oueal\Documents\Projects\airflow_plugins\test.py'
Traceback (most recent call last):
  File "c:\Users\oueal\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd_launcher.py", line 118, in <module>
    vspd.debug(filename, port_num, '', '', run_as)
  File "c:\Users\oueal\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd\ptvsd\debugger.py", line 37, in debug
    run(address, filename, *args, **kwargs)
  File "c:\Users\oueal\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd\ptvsd\_local.py", line 79, in run_file
    run(argv, addr, **kwargs)
  File "c:\Users\oueal\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd\ptvsd\_local.py", line 140, in _run
    _pydevd.main()
  File "c:\Users\oueal\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1751, in main
    debugger.connect(host, port)
  File "c:\Users\oueal\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1107, in run
    return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
  File "c:\Users\oueal\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1114, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "c:\Users\oueal\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\_pydev_imps\_pydev_execfile.py", line 25, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "c:\Users\oueal\Documents\Projects\airflow_plugins\test.py", line 1, in <module>
    import tableausdk.Server
  File "C:\Users\oueal\AppData\Local\Continuum\anaconda3\lib\site-packages\tableausdk\Server.py", line 21, in <module>
    server_lib = libs.load_lib('Server')
  File "C:\Users\oueal\AppData\Local\Continuum\anaconda3\lib\site-packages\tableausdk\Libs.py", line 36, in load_lib
    self.libs[lib_name] = ctypes.cdll.LoadLibrary(self.lib_paths[lib_name])
  File "C:\Users\oueal\AppData\Local\Continuum\anaconda3\lib\ctypes\__init__.py", line 426, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\oueal\AppData\Local\Continuum\anaconda3\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 127] La procédure spécifiée est introuvable
PS C:\Users\oueal\Documents\Projects\airflow_plugins>

The funny thing though is that doing
import tableausdk
is fine, but tableausdk.Server is having issue.

Also as per issue #2862, I have set "python.terminal.activateEnvironment": false

EDIT: I forgot to mention that if I run the same code through

python test.py

there is no error, and it is working as expected

@lock lock bot locked as resolved and limited conversation to collaborators Nov 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant