Coder Social home page Coder Social logo

Comments (4)

aalemanq avatar aalemanq commented on May 20, 2024

Same here....

(netboxenv)root@netbox:/opt/netbox# pip install textfsm
Collecting textfsm
Using cached https://files.pythonhosted.org/packages/a1/0d/a1b490503545b3b4600b965eae5d44cc2b6ce27cfb44f4debc563dbb56d3/textfsm-0.4.1.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/textfsm.egg-info
writing top-level names to pip-egg-info/textfsm.egg-info/top_level.txt
writing dependency_links to pip-egg-info/textfsm.egg-info/dependency_links.txt
writing pip-egg-info/textfsm.egg-info/PKG-INFO
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-i3s0hljb/textfsm/setup.py", line 50, in
'texttable', 'terminal'])
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/netbox/netboxenv/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 161, in run
writer(self, ep.name, os.path.join(self.egg_info, ep.name))
File "/opt/netbox/netboxenv/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 349, in write_pkg_info
metadata.write_pkg_info(cmd.egg_info)
File "/usr/lib/python3.4/distutils/dist.py", line 1108, in write_pkg_info
self.write_pkg_file(pkg_info)
File "/usr/lib/python3.4/distutils/dist.py", line 1129, in write_pkg_file
long_desc = rfc822_escape(self.get_long_description())
File "/usr/lib/python3.4/distutils/util.py", line 470, in rfc822_escape
lines = header.split('\n')
TypeError: Type str doesn't support the buffer API

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

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-i3s0hljb/textfsm/

from textfsm.

xavierhardy avatar xavierhardy commented on May 20, 2024

I need to reproduce this first, but the long description is actually the content of the README file, I think the open function from codecs does not convert it to a string if no encoding is provided in that Python version.

in setup.py

from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.md')) as f:
    long_description = f.read()

from textfsm.

xavierhardy avatar xavierhardy commented on May 20, 2024

Try to reproduce the error without pip by cloning the repository and running python setup.py install. Try forcing the encoding to utf8 in the open function.

with open(path.join(here, 'README.md'), encoding="utf8") as f:

from textfsm.

xavierhardy avatar xavierhardy commented on May 20, 2024

https://docs.python.org/3.4/library/codecs.html#codecs.open

from textfsm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.