Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

ValueError: Newlines are not allowed when run python setup.py #20829

Open
hubutui opened this issue Jan 19, 2022 · 1 comment
Open

ValueError: Newlines are not allowed when run python setup.py #20829

hubutui opened this issue Jan 19, 2022 · 1 comment

Comments

@hubutui
Copy link

hubutui commented Jan 19, 2022

Description

python setup.py complains that "ValueError: Newlines are not allowed" in setup().

Error Message

Traceback (most recent call last):
  File "/build/mxnet-git/src/mxnet-git/python/setup.py", line 120, in <module>
    setup(name='mxnet',
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.10/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.10/site-packages/setuptools/command/install.py", line 68, in run
    return orig.install.run(self)
  File "/usr/lib/python3.10/distutils/command/install.py", line 580, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.10/site-packages/setuptools/command/install_egg_info.py", line 34, in run
    self.run_command('egg_info')
  File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 292, in run
    writer(self, ep.name, os.path.join(self.egg_info, ep.name))
  File "/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 656, in write_pkg_info
    metadata.write_pkg_info(cmd.egg_info)
  File "/usr/lib/python3.10/distutils/dist.py", line 1117, in write_pkg_info
    self.write_pkg_file(pkg_info)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 167, in write_pkg_file
    write_field('Summary', single_line(self.get_description()))
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 151, in single_line
    raise ValueError('Newlines are not allowed')
ValueError: Newlines are not allowed

What have you tried to solve it?

Modify description to a str without newline in https://github.com/apache/incubator-mxnet/blob/7d84b598459985a59f7601f638cf8707389609c9/python/setup.py#L122 fix it.

@gnaggnoyil
Copy link

Possible related setuptools issue:
pypa/setuptools#1390

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants