question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

max slug attempts exceeded AutoSlugField

See original GitHub issue

This poped in release 1.5.6

File "/Users/arun/pyenvs/zubha1.8/lib/python2.7/site-    packages/django_extensions/db/fields/__init__.py", line 145, in slug_generator
(original_slug, MAX_UNIQUE_QUERY_ATTEMPTS))
RuntimeError: max slug attempts for test-org exceeded (100)

Slug generation is failing.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
trbscommented, Oct 20, 2016

Commit: https://github.com/django-extensions/django-extensions/commit/30730f7212fb40eb7d9d64245a13fdcf22ada74e

django_extensions/db/fields/__init__.py
30:MAX_UNIQUE_QUERY_ATTEMPTS = getattr(settings, 'EXTENSIONS_MAX_UNIQUE_QUERY_ATTEMPTS', 100)

The setting name is settings.EXTENSIONS_MAX_UNIQUE_QUERY_ATTEMPTS. Please try with that.

1reaction
trbscommented, Oct 18, 2016

You probably have more then 100 conflicts for the test-org slug. (aka test-org-100 also exists)

Happy to except PR requests to add additional modes like a random 8 char postfix instead of just sequential numbers.

In the git version you can now configure MAX_UNIQUE_QUERY_ATTEMPTS (default = 100) either by passing kwargs to the field or settings EXTENSION_MAX_UNIQUE_QUERY_ATTEMPTS in settings.py.

(btw if somebody wants to write a PR for unifying the way we deal with configuration options in settings.py cause that’s kind of a mess right now 😃 )

Read more comments on GitHub >

github_iconTop Results From Across the Web

db/fields/__init__.py · hemamaps/django-extensions - Gemfury
_slug_strip(slug) slug = '%s%s' % (slug, end) yield slug raise RuntimeError('max slug attempts for %s exceeded (%s)' % (original_slug, ...
Read more >
Django: Increasing the size of Slug with Unique True
According to the documentation the maximum length for a SlugField is 255 characters. But it is the database backend that enforces it so, ......
Read more >
Field Extensions — django-extensions 3.2.1 documentation
AutoSlugField - AutoSlugField will automatically create a unique slug incrementing an appended number on the slug until it is unique.
Read more >
https://raw.githubusercontent.com/django-extension...
CharField(max_length=42) slug = AutoSlugField(populate_from='title') ... end) yield slug raise RuntimeError('max slug attempts for %s exceeded (%s)' ...
Read more >
django-oscar Documentation - Read the Docs
Returns maximum product quantity, that can be added to the basket with the respect to ... This makes no attempt at generating a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found