-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
bug: RecursionError: maximum recursion depth exceeded #302
Comments
Hi @quantfreedom, thank you for the report. Unfortunately I am not able to reproduce the issue you describe. Here is what I tried: git clone https://github.com/quantfreedom/QuantFreedom
cd QuantFreedom
git checkout dev
poetry install -E docs
poetry run python gen_ref_pages.py (These are the instructions you should have posted instead of "just download my quantfreedom dev branch" by the way 🙏 ) It fails with Then I upgrade Griffe in the venv and try again: poetry run pip install -U griffe
poetry run python gen_ref_pages.py It fails again with Indeed, the following works fine: % poetry run python
Python 3.11.5 (main, Aug 26 2023, 14:36:58) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import griffe
>>> griffe.load("quantfreedom")
Module(PosixPath('/media/data/dev/QuantFreedom/quantfreedom/__init__.py')) Happy to investigate further if you can give me instructions to reproduce the recursion error 🙂 |
@pawamoy i think it is because in the main quantfreedom folder u have no folder named docs ... so I think if u create that folder then it should work |
Thanks. I did just that, then ran again the |
The |
It works on both Python 3.11 and 3.12. |
Maybe try to reset your virtual environment (removing and recreating it)? |
@pawamoy hmmmm maybe I need to delete my docs folder or something and try from scratch Also what version of python are u running I am running 3.12.4 |
@pawamoy ok i am dumb ... i didn't push my changes to the dev branch but now i did so you can try it again also i tried to delete my docs folder and make a new one and it was still giving me the same error also i know you said it works on 3.12 but specifically 3.12.4? which 3.12 are you running? |
Thanks for the update. I'm left wondering if
by
...in |
@pawamoy ok it works now ... but i don't know enough about why has_docstrings is a good or bad idea ... are you talking about in general or are you talking about in this specific situation? also there is probably an extremely high chance that i am not doing something like most coders would do as far as good coding practice. So if you think i should or shouldn't be doing something on documenting my code that you noticed please let me know as i am 100% self taught and never really spoke to anyone who has a high amount of skill in python about the dos and don'ts of documentation |
I meant in general. The semantics of
Congrats on being self-taught! I am too myself, in the sense that I never had private lessons to learn Python, only read tons of code and online tutorials, articles, blog posts, etc. 🙂 I didn't carefully read all your code but I don't think you're doing anything wrong, don't worry 👍 |
@pawamoy ok sounds good ... so the hot fix that i added, will that be something maybe you will look to upgrade in the future or what should i do with that hot fix vs updating when you update griffe? |
I'll push a new release soon with the fix :) You'll just have to upgrade. |
…om `has_docstrings`, unless they're public Issue-302: #302
Description of the bug
this file used to work perfectly fine but now it doesn't ... i was on python 3.10.10 and griffe v 0.45.2 but now i am on 3.12.4 and griffe 0.47.0 so not sure if that is causing the problem or i am just an idiot
I keep getting a RecursionError: maximum recursion depth exceeded when i run this code
https://github.com/quantfreedom/QuantFreedom/blob/efb0cc838d70b7c56ae21702d05d8ff02b2a2447/gen_ref_pages.py
To Reproduce
Full traceback
Full traceback
Expected behavior
it is supposed to grab all the py files that have doc strings and turn the doc strings into md files
Environment information
griffe --debug-info # | xclip -selection clipboard
PYTHONPATH
:E:\Coding\my_stuff
griffe
v0.47.0Additional context
the error just keeps repeating forever
The text was updated successfully, but these errors were encountered: