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

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

问题描述

的Tableau最近扩大了一些工具为开发人员到Linux,从只有Windows的。下载的Tableau数据提取API 库的Python(后2.7)在Linux(64位,8.1版),我解压缩文件并安装使用标准巨蟒的setup.py安装'库

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'

当试图用code,它在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?

推荐答案

复制或提取库,其中的链接,实际上文件时存在错误。类似的例子是<一个href=\"http://askubuntu.com/questions/24266/error-while-loading-shared-libraries-file-too-short\">here.

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

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

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