“文件太短"使用 Tableau 数据提取 API(Python 和 Linux) [英] "File too short" with Tableau Data Extract API (Python and Linux)

查看:18
本文介绍了“文件太短"使用 Tableau 数据提取 API(Python 和 Linux)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Tableau 最近将一些面向开发人员的工具从仅限 Windows 扩展到了 Linux.下载 Python 的 Tableau 数据提取 API 库后(2.7) 在 Linux(64 位,8.1 版)上,我使用标准的python setup.py install"提取了文件并安装了库

Tableau recently expanded some tools for developers to Linux, from Windows-only. After downloading the Tableau Data Extract API libraries for Python (2.7) on Linux (64Bit, version 8.1), I extracted the files and installed the libraries using the standard 'python setup.py install'

尝试使用适用于 Windows 的代码运行时,出现以下错误:

When trying to run with a code that works on Windows, I get the following error:

Traceback (most recent call last):
File "apache.py", line 280, in <module>
  print create_tableau(tsvfile)
File "apache.py", line 136, in create_tableau
  import dataextract as tde
File "/usr/local/lib/python2.7/dist-packages/dataextract/__init__.py", line 15, in <module>
  from Base import *
File "/usr/local/lib/python2.7/dist-packages/dataextract/Base.py", line 17, in <module>
  from . import StringUtils
File "/usr/local/lib/python2.7/dist-packages/dataextract/StringUtils.py", line 17, in <module>
  tablib = libs.load_lib
File "/usr/local/lib/python2.7/dist-packages/dataextract/Libs.py", line 35, in load_lib
  self.lib = ctypes.cdll.LoadLibrary(self.lib_path)
File "/usr/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
  return self._dlltype(name)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
  self._handle = _dlopen(self._name, mode)
OSError: /usr/local/lib/python2.7/dist-packages/dataextract/lib/../lib/libicuio.so.50: file too short

如何解决这个文件太短"错误?

How can I fix this 'file too short' error?

推荐答案

复制或提取库时出错,其中链接实际上是文件.一个类似的例子是这里.

There is an error when copying or extracting the libraries, where the links are actually files. A similar example is here.

您需要删除应该是链接的文件,然后重新链接它们.

You need to remove the files that are supposed to be links, and then re-link them.

cd /usr/local/lib/python2.7/dist-packages/dataextract/lib/../lib/

rm libicudata.so.50 && ln -s libicudata.so.50.1.2 libicudata.so.50
rm libicui18n.so.50 && ln -s libicui18n.so.50.1.2 libicui18n.so.50
rm libicuio.so.50 && ln -s libicuio.so.50.1.2 libicuio.so.50
rm libicule.so.50 && ln -s libicule.so.50.1.2 libicule.so.50
rm libiculx.so.50 && ln -s libiculx.so.50.1.2 libiculx.so.50
rm libicutu.so.50 && ln -s libicutu.so.50.1.2 libicutu.so.50
rm libicuuc.so.50 && ln -s libicuuc.so.50.1.2 libicuuc.so.50

这篇关于“文件太短"使用 Tableau 数据提取 API(Python 和 Linux)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆