33 questions
-1
votes
2
answers
165
views
Why does python limit recursion depth, and how is this limit decided?
# Iterative factorial function to safely compute very large factorials without hitting Python's recursion limit.
# Recursive functions have a maximum depth, usually 1000, and factorial(2000) would ...
2
votes
0
answers
156
views
Selenium Python - RecursionError('maximum recursion depth exceeded in comparison')
when executing the Selenium Python script, the following terrible error appears:
object address: 000001340
object refcount: 2
object type: 00007FFA03482550
object type name: RecursionError
object repr:...
0
votes
1
answer
53
views
Turtle crashing after many moves
I'm messing around with recursion and decided to turtle. I'm trying to get some code to build a Sierpenski Triangle and it's working pretty well so far! However, when I plug in larger values of n to ...
0
votes
0
answers
85
views
AttributeError and RecursionError happened when using `__setattr__` in python
I used super() as a part of the __setattr__ method to update a dictionary whenever an attribute value is set on an instance of a class; however, a warning reported as my class object has no such ...
-4
votes
1
answer
3k
views
How to fix RecursionError: maximum recursion depth exceeded
Here's the question:
07. Define a function named import_zip_codes_json() which imports the zip_codes.json as a list in working directory.
Here's the code:
import json
with open('zip_codes.json') as ...
1
vote
2
answers
225
views
How to fix a RecursionError in Turtle?
I'm trying to write a program with Python to emulate an 'old' online game in which you drive a worm through the screen with some inputs from the keyboard.
import turtle
# Set screen and background
wn ...
-1
votes
1
answer
127
views
How can i solve this inequality in python? RecursionError: maximum recursion depth exceeded while getting the str of an object
I am trying to get the interval of acceptable values in this inequality:
12/300 < 0.45*sympy.sqrt(Ro/(2*f*x))
where R is calculated in the code.
I want the interval of x. How can I get it?
#...
-1
votes
1
answer
149
views
Recursion error with if statement when changing items in PYQT5 table python
I have a table in pyqt5 and when I modify a cell I call a method(changeIcon), inside this method I use an if statement to check which column has been changed and based on the column I change some ...
0
votes
0
answers
308
views
How to solve RecursionError without sys.setrecursionlimit() in python
I have implemented recursive functions that work on big database and it raises
RecursionError: maximum recursion depth exceeded while calling a Python object
To solve it I added sys.setrecursionlimit(...
0
votes
1
answer
361
views
Python - RecursionError - maximum recursion depth exceeded
I'm a student working on this homework problem. The code tries to find a solution to any given circular board game, where a list is given as an argument. The values in the list tell the program how ...
2
votes
2
answers
703
views
Binary Search RecursionError: maximum recursion depth exceeded in comparison
I was trying to execute the Binary Search program in python. I followed the algorithm steps yet it gives me this error. Here's my code:
def binarySearch(a,k,l,r):
if l > r:
return -...
0
votes
1
answer
78
views
RecursionError when updating multiple Text Fields in Kivy, Python
we are coding an app that is a converter.
So there are 8 text fields in the app (from .kv file). We use on_text parameter to update the other text fields accordingly, but when we update a certain ...
0
votes
1
answer
523
views
Django Storages SFTPStorage - How to fix RecursionError?
I am trying to move my Django file storage to an external server, connected via ethernet to a small local network. This local network is not connected to the internet.
I am using django-storages ...
0
votes
2
answers
612
views
RecursionError when inheriting from float and using str and repr
I was testing some features in Python for fun ;)
But I have a recursion error that I don't understand
class Test(float):
def __new__(cls, value):
return super().__new__(cls, value)
...
1
vote
1
answer
533
views
signal.pause() with signal.alarm() causes RecursionError in non-sleeping program
Single-threaded python program, intending to be responsive to events from raspberry pi button presses also wants to wake every minute to update an LCD display.
Main function:
btn_1 = 21
GPIO.setup(...
0
votes
1
answer
2k
views
RecursionError: maximum recursion depth exceeded in comparison - sys.setrecursionlimit(1500)
I am doing a Python exercise using recursion.
The goal is to request which maximum value the user wants to study and to test all the values from 1 to this maximum value. The algorithm always reachs 1 ...
19
votes
4
answers
62k
views
Django/Python Runtime Error: Maximum recursion depth exceeded
I'm trying to add a blog app to my Django project. When I put everything together, I can see my blog posts page, but something with the blogapp/urls.py file is causing me to get a maximum recursion ...