Hi,
I try to get my python script worling with finalbuilder 8. I have a small script that send rest api to a woordpress.
The script is working well if executed from python 2.7. But if I execute it with final builder, the script could not find my librarie (installed from pip command.
I have added the python lib path to the script option. The library as been installed in the c:\python27\lib\site-packages\wordpress_json
So here the script
---------------------------------------------------------------------
from wordpress_json import WordpressJsonWrapper
wp = WordpressJsonWrapper(‘http://192.168.2.89/wp-json/wp/v2’, ‘admin’, ‘password’)
wp.create_post(data=dict(title=“My title3”, content=“My content”, status=“publish”))
---------------------------------------------------------------------
The problem is that the python could not find the library
Run Script
Status:
Date: 2017-01-19
Time: 08:20:02:691
End: 08:20:05:860
Duration: 00:00:03:169
Action Messages:
Traceback (most recent call last):
File “script”, line 4, in
ImportError: No module named wordpress_json
import sys
sys.path.append(‘C:\Python27\Lib\site-packages’)
No I get this error
Run Script
Status:
Date: 2017-01-19
Time: 08:21:42:936
End: 08:21:45:863
Duration: 00:00:02:927
Action Messages:
Traceback (most recent call last):
File “script”, line 4, in
File “C:\Python27\Lib\site-packages\wordpress_json_init_.py”, line 16, in
File “C:\Python27\Lib\site-packages\requests_init_.py”, line 52, in
File “C:\Python27\Lib\site-packages\requests\packages_init_.py”, line 27, in
File “C:\Python27\Lib\site-packages\requests\packages\urllib3_init_.py”, line 8, in
File “C:\Python27\Lib\site-packages\requests\packages\urllib3\connectionpool.py”, line 11, in
File “C:\Python27\Lib\site-packages\requests\packages\urllib3\exceptions.py”, line 2, in
File “C:\Python27\Lib\site-packages\requests\packages\urllib3\packages\six.py”, line 701, in
File “C:\Python27\Lib\site-packages\requests\packages\urllib3\packages\six.py”, line 692, in exec_
AttributeError: ‘module’ object has no attribute '_getframe’
Here the official doc
https://pypi.python.org/pypi/wordpress_json
Regards
Jonathan