Skip to content
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

Installation error: AttributeError: 'UltraMagicString' object has no attribute 'endswith' #421

Open
sbenthall opened this issue Oct 15, 2022 · 3 comments

Comments

@sbenthall
Copy link

Installation from source on Pop!_OS 22.04 LTS 64-bit failed with:

Collecting django-sortedm2m==0.8.1
  Downloading django-sortedm2m-0.8.1.tar.gz (26 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-n1vrrpnf/django_sortedm2m.egg-info
      writing /tmp/pip-pip-egg-info-n1vrrpnf/django_sortedm2m.egg-info/PKG-INFO
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-dqgifzw7/django-sortedm2m_981131a807284449a1a6393702cfc37b/setup.py", line 55, in <module>
          setup(
        File "/var/www/roundware/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/var/www/roundware/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/var/www/roundware/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/var/www/roundware/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "/var/www/roundware/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/var/www/roundware/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/var/www/roundware/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 301, in run
          writer(self, ep.name, os.path.join(self.egg_info, ep.name))
        File "/var/www/roundware/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 675, in write_pkg_info
          metadata.write_pkg_info(cmd.egg_info)
        File "/var/www/roundware/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1136, in write_pkg_info
          self.write_pkg_file(pkg_info)
        File "/var/www/roundware/lib/python3.10/site-packages/setuptools/dist.py", line 233, in write_pkg_file
          if not long_description.endswith("\n"):
      AttributeError: 'UltraMagicString' object has no attribute 'endswith'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
@sbenthall
Copy link
Author

I seem to get a related error when trying vagrant up
https://gist.github.com/sbenthall/f9344d9d40bb47f5cf18c39271f5b93a

@sbenthall
Copy link
Author

It looks like the masterbranch of roundware is pinned to v0.8.1 of django-sortedm2m.
But there is a version 3.11 available for this library.

@hburgund
Copy link
Member

I was able to spin up a vagrant instance fresh by changing the django-sortedm2m version to 3.1.1 in requirements. I have not had time to test if there are any functional issues as a result, but Roundware hardly uses the sortedm2m functionality anymore, so I don't anticipate any issues. That said, definitely keep an eye out!

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

No branches or pull requests

2 participants