Missing time library

i'm somehow missing the time library. where can i find this or import it?

What version of Ignition are you using? Do you happen to have a script library named "time" or something like that?

v8.1.27
i'm looking in the user-lib/pylib folder?

No, I mean one defined in your project.

You shouldn't need to be messing around in the pylib folder for this to work, and shouldn't need to be adding any libraries.

right, but mine doesn't work. i can't import time or sleep

Yes. In your project browser, under 'Project Library', do you have a script or folder literally called time?

image

Like this:

oh no, nothing named "time"

If this project inherits from another project, you'll have to check the parent (and its parents) as well.

Otherwise it's likely one of your scripts somewhere has exported over or otherwise clobbered that package somehow.

No parent project for this project.
Is there a way for me to recover the library?

What is the result of this script in the script console?

import time

print dir(time)
print type(time)

(copy/paste the result, don't screenshot)

@jesse.daniels - Is your "L" in sleep actually a lowercase "L"? It sure looks like the number one "1" to me... Edit: Never mind, just the font on your machine.

By the way, if the a time module didn't exist you would get an ImportError: No module named time.

['add', 'class', 'cmp', 'contains', 'delattr', 'doc', 'ensure_finalizer', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'getslice', 'gt', 'hash', 'init', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmul', 'setattr', 'str', 'subclasshook', '_formatter_field_name_split', '_formatter_parser', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdecimal', 'isdigit', 'islower', 'isnumeric', 'isspace', 'istitle', 'isunicode', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
<type 'str'>

hm, so i'm just missing the sleep definition from time?

No, something in your project is redefining time. It shouldn’t be of type str.

You might need to call support and let them try to help you find whatever you’ve done.

ok, thanks