Answer the question
In order to leave comments, you need to log in
How to fix NameError: name 'slep' is not defined error on RPi with pyTelegramBotAPI library?
When running an elementary bot on mac, everything is fine, but when I run it on RPi, it gives an error
Traceback (most recent call last):
File "botTest.py", line 3, in <module>
import telebot
File "/usr/local/lib/python2.7/dist-packages/telebot/__init__.py", line 23, in <module>
from telebot import apihelper, types, util
File "/usr/local/lib/python2.7/dist-packages/telebot/apihelper.py", line 3, in <module>
import requests
File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 68, in <module>
_attach_namespace(urllib3, 'requests.packages')
File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 61, in _attach_namespace
package.__name__ + '.'):
File "/usr/lib/python2.7/pkgutil.py", line 105, in walk_packages
for importer, name, ispkg in iter_modules(path, prefix):
File "/usr/lib/python2.7/pkgutil.py", line 147, in iter_modules
for name, ispkg in iter_importer_modules(i, prefix):
File "/usr/lib/python2.7/pkgutil.py", line 196, in iter_modules
import inspect
File "/usr/lib/python2.7/inspect.py", line 37, in <module>
import dis
File "/home/pi/dis.py", line 32, in <module>
slep(5)
NameError: name 'slep' is not defined
Answer the question
In order to leave comments, you need to log in
Maybe you need sleep()? Or time.sleep()?
It would be better if you give more code.
Learn to read error messages. You also write that the name slep is not defined.
That is, either you wrote it incorrectly (slep instead of sleep), or this function was not imported, or not defined at all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question