-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
TypeError: 'float' object cannot be interpreted as an integer (for all commands) #46
Comments
Thank you for your feedback. There has already been a report #45 of issues with Python 3.12. I have added the suggested fix in the code but not tested much. Possibly it also fixes the issue you have. I intend to do a release at some point (I wanted to add some other changes but maybe I will release just for that). In the meantime, some options:
|
Upgrading asks to v3.0.0 worked! Thanks! |
I got the config command to work, but when I try to export an ePub I get an ssl certificate error. (jncep-venv) Cactus-Laptop:~ XXXXXXX$ jncep epub -o /Users/XXXXXXX/Desktop/jncbooks http://j-novel.club/read/ascendance-of-a-bookworm-part-5-volume-8-part-5 |
|
Awesome, that was it. Thank you! Also thanks for building such a cool tool, I'm so happy it exists! |
I have updated to the later versions for Trio and asks and the commands seem to work fine on Python 3.8 to 3.12. So this issue should be fixed in the next jncep version. |
Describe the bug
When trying to run any command I get this TypeError. I had it working on an older intel MacBook, but I recently upgraded to an M3 MacBook Pro and have not been able to get the program to run because of this error. I am using Python 3.12.0 with jncep installed via pip3 in a venv.
(jncep-venv) Cactus-Laptop:~ XXXXXXXXX$ jncep config set EMAIL "XXXXXXXX@gmail.com"
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.12/bin/jncep", line 5, in
from jncep.jncep import main
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jncep/jncep.py", line 6, in
from .cli.config import config_manage
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jncep/cli/config.py", line 5, in
from .. import config, track, utils
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jncep/track.py", line 11, in
from . import config, core, jncweb, spec, utils
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jncep/core.py", line 17, in
from . import epub, jnclabs, jncweb, spec, utils
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jncep/jnclabs.py", line 6, in
import asks
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asks/init.py", line 5, in
from .base_funcs import *
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asks/base_funcs.py", line 8, in
from .sessions import Session
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asks/sessions.py", line 16, in
from .request_object import RequestProcessor
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asks/request_object.py", line 31, in
_BOUNDARY = "8banana133744910kmmr13a56!102!" + str(randint(1e3, 9e3))
^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/random.py", line 336, in randint
return self.randrange(a, b+1)
^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/random.py", line 301, in randrange
istart = _index(start)
^^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integer
Expected behavior
I should be able to run the commands to set the email and password and make epub files.
To Reproduce
Any commands. Specially I've tried these two and a couple of others.
jncep -d epub -o /Users/XXXXXXX/Desktop/jncbooks https://j-novel.club/read/ascendance-of-a-bookworm-part-5-volume-8-part-5
jncep config set EMAIL "XXXXXXXX@gmail.com"
Debug trace
(jncep-venv) Cactus-Laptop:~ XXXXXXX$ jncep -d epub -o /Users/XXXXXXX/Desktop/jncbooks https://j-novel.club/read/ascendance-of-a-bookworm-part-5-volume-8-part-5
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.12/bin/jncep", line 5, in
from jncep.jncep import main
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jncep/jncep.py", line 6, in
from .cli.config import config_manage
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jncep/cli/config.py", line 5, in
from .. import config, track, utils
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jncep/track.py", line 11, in
from . import config, core, jncweb, spec, utils
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jncep/core.py", line 17, in
from . import epub, jnclabs, jncweb, spec, utils
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jncep/jnclabs.py", line 6, in
import asks
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asks/init.py", line 5, in
from .base_funcs import *
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asks/base_funcs.py", line 8, in
from .sessions import Session
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asks/sessions.py", line 16, in
from .request_object import RequestProcessor
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asks/request_object.py", line 31, in
_BOUNDARY = "8banana133744910kmmr13a56!102!" + str(randint(1e3, 9e3))
^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/random.py", line 336, in randint
return self.randrange(a, b+1)
^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/random.py", line 301, in randrange
istart = _index(start)
^^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integer
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: