Open W72702 opened 2 years ago
Note fixed it by editing Kernel.py
Can you tell me how you fixed it?
edit Kernal.py to remove the time.clock() bit
It's still giving some weird errors, could you please share your kernel.py file instead as it's corrected so I could replace mine.
I have no clue i got issues to
ImportError: attempted relative import with no known parent package
I am also having this errors like aiml parsing!......
After i run jarvis.py i get this
Parsing aiml files Traceback (most recent call last): File "C:\Users%user%\Downloads\AI\jarvis.py", line 37, in k.bootstrap(learnFiles="std-startup.aiml", commands="load aiml b") File "C:\Users%user%\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\aiml\Kernel.py", line 131, in bootstrap start = time.clock() AttributeError: module 'time' has no attribute 'clock'
I am finally found the solution for this issue.That is requirements.txt file contains aiml
package but the package's actual name is python-aiml
.So you need to run pip install python-aiml
The error occurs because in Python 3.8 and later, the time.clock() function was removed. It was replaced with time.perf_counter() or time.process_time() depending on what you need.
To fix this, you can replace all occurrences of time.clock() in the Kernel.py file (or in any other file) with time.perf_counter().
Here's how to fix it:
Open the file at Kernel.py. Search for time.clock() and replace it with time.perf_counter().
After i run jarvis.py i get this
Parsing aiml files Traceback (most recent call last): File "C:\Users\%user%\Downloads\AI\jarvis.py", line 37, in
k.bootstrap(learnFiles="std-startup.aiml", commands="load aiml b")
File "C:\Users\%user%\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\aiml\Kernel.py", line 131, in bootstrap
start = time.clock()
AttributeError: module 'time' has no attribute 'clock'