my code:
the code is try to send request to google
from numba import jit
import requests
@jit()
def x():
requests.get("https://google.com")
x()
the error:
that is the text of error i got it
[Running] python -u "/home/nfrxd/Documents/kk.py"
Traceback (most recent call last):
File "/home/nfrxd/Documents/kk.py", line 6, in <module>
x()
File "/home/nfrxd/.local/lib/python3.11/site-packages/numba/core/dispatcher.py", line 468, in _compile_for_args
error_rewrite(e, 'typing')
File "/home/nfrxd/.local/lib/python3.11/site-packages/numba/core/dispatcher.py", line 409, in error_rewrite
raise e.with_traceback(None)
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
[1m[1mUnknown attribute 'get' of type Module(<module 'requests' from '/home/nfrxd/.local/lib/python3.11/site-packages/requests/__init__.py'>)
[1m
File "kk.py", line 5:[0m
[1mdef x():
[1m requests.get("https://google.com")
[0m [1m^[0m[0m
[0m
[0m[1mDuring: typing of get attribute at /home/nfrxd/Documents/kk.py (5)[0m
[1m
File "kk.py", line 5:[0m
[1mdef x():
[1m requests.get("https://google.com")
[0m [1m^[0m[0m
[Done] exited with code=1 in 0.631 seconds
i tried use njit so any way to fix?