Hi all,
New to SharpCap scripting, thought I'd get started browsing through the interactive help in the Python Console. however typing help() results in the following error:
help> Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\SharpCap 4.1 (64 bit)\PythonLib.zip\_sitebuiltins.py", line 103, in __call__
File "C:\Program Files\SharpCap 4.1 (64 bit)\PythonLib.zip\pydoc.py", line 1846, in __call__
File "C:\Program Files\SharpCap 4.1 (64 bit)\PythonLib.zip\pydoc.py", line 1858, in interact
File "C:\Program Files\SharpCap 4.1 (64 bit)\PythonLib.zip\pydoc.py", line 1869, in getline
LookupError: unknown encoding: codepage___0
>>>
I've uninstalled and reinstalled, same result. Running the most recent release 4.1.11804, 64-bit with Pro license. Not sure if I've screwed something up or what. Script commands such as opening a camera, etc seem to work fine so I'm not sure what the problem is.
Thanks for helping out a noob!
-Patrick
Noob interactive help problem
- admin
- Site Admin
- Posts: 13520
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Noob interactive help problem
Hi Patrick,
I see the same when just running 'help()' at the console, however, I do get useful results when running either of
hope this helps,
Robin
I see the same when just running 'help()' at the console, however, I do get useful results when running either of
Code: Select all
helpme() # SharpCap's brief getting started help
help(SharpCap) # Help on the properties/methods of the global 'SharpCap' object
Robin
-
- Posts: 6
- Joined: Sun Feb 25, 2024 6:14 pm
Re: Noob interactive help problem
Hi,
Those commands appear to work fine for me as well, I was a little concerned that somehow the install had become corrupted. Apparently I was misled by the startup prompt "Type "help", <...> for more information". Typing "help" results in "Type help() for interactive help, or help(object) <...>"
I guess I'll just script on and not worry about it. Thanks!
Those commands appear to work fine for me as well, I was a little concerned that somehow the install had become corrupted. Apparently I was misled by the startup prompt "Type "help", <...> for more information". Typing "help" results in "Type help() for interactive help, or help(object) <...>"
I guess I'll just script on and not worry about it. Thanks!
- admin
- Site Admin
- Posts: 13520
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Noob interactive help problem
Hi,
actually, looking at the error again, I think the root cause of it may be that the SharpCap Python environment does *not* support python code reading input from the terminal, which help tries to do. If you try to run
then you get the same 'Codepage 0' error. Since it can't read input from the terminal, the 'interactive' help doesn't work, but you can still use help(object).
I did look into supporting input() in the python console code - it turned out to be surprisingly complex for what is really quite a niche use case, so I didn't end up doing it.
cheers,
Robin
actually, looking at the error again, I think the root cause of it may be that the SharpCap Python environment does *not* support python code reading input from the terminal, which help tries to do. If you try to run
Code: Select all
x = input()
I did look into supporting input() in the python console code - it turned out to be surprisingly complex for what is really quite a niche use case, so I didn't end up doing it.
cheers,
Robin