ScriptUO

Scripting Resources & Utilities => Stealth Client => Topic started by: blackbeard on February 09, 2018, 11:39:55 AM

Title: [FIXED]Help with python 3.4 Stealth 8.7.2 - External Libraries
Post by: blackbeard on February 09, 2018, 11:39:55 AM
Hi, there is some time i`ve been away from uo and i did a lot of macros with Pascal that time. Now i`m back and want to learn python with ultima online but i need help.

In Stealth Client settings, Script Engine folder, i included the path from my installation of Python 3.4 (C:\Python34\Lib\site-packages) as image shows.

https://ibb.co/c5Np0c (https://ibb.co/c5Np0c)

And i`m having problem importing theses other libraries from python.

When i try to import a library like numpy it gives me this error

Code: [Select]
from stealth import *
import numpy as np


Code: [Select]
18:33:08:320 [tfg noob]: Traceback (most recent call last):
18:33:08:320 [tfg noob]:   File "D:\Jogos\Ultima Online\Stealth_v8.7.2\Scripts\auto.py", line 2, in <module>
18:33:08:320 [tfg noob]:     import numpy as np
18:33:08:320 [tfg noob]:   File "C:\Python34\lib\site-packages
umpy\__init__.py", line 142, in <module>
18:33:08:320 [tfg noob]:     from . import add_newdocs
18:33:08:320 [tfg noob]:   File "C:\Python34\lib\site-packages
umpy\add_newdocs.py", line 13, in <module>
18:33:08:320 [tfg noob]:     from numpy.lib import add_newdoc
18:33:08:320 [tfg noob]:   File "C:\Python34\lib\site-packages
umpy\lib\__init__.py", line 8, in <module>
18:33:08:320 [tfg noob]:     from .type_check import *
18:33:08:320 [tfg noob]:   File "C:\Python34\lib\site-packages
umpy\lib\type_check.py", line 11, in <module>
18:33:08:320 [tfg noob]:     import numpy.core.numeric as _nx
18:33:08:320 [tfg noob]:   File "C:\Python34\lib\site-packages
umpy\core\__init__.py", line 16, in <module>
18:33:08:320 [tfg noob]:     from . import multiarray
18:33:08:320 [tfg noob]: TypeError: source code string cannot contain null bytes


Is there a solution to to use opencv, pillow and others external python libraries? :D

Post Merge: February 10, 2018, 02:29:05 AM
[FIXED] The fix was to install python 2.7.14. Now it is importing and running external lib.