dgarozzo wrote:I'm trying to embed socketIO_client, but I'm having problems. Did you copy the socketIO_client folder from GitHub, or from your Library/Python directory? Or is there some way to run the installer and have it put it directly in my plugin folder?...
sys.path.insert(1, './Modules')
sys.path.append('./Modules')
dgarozzo wrote:Ok everybody. I think I got it working again. I promise this worked before! Please get the latest from GitHub.
I've moved everything to use Requests instead of httplib.HTTPSConnection. I also added a checkbox to simplify things while you wait for location information from Automatic.
I have not bundled in the libraries yet. I will try to work on that later. You may need to do the following:
- Code: Select all
sudo -H pip install -U requests[security] --ignore-installed six
sudo -H pip install --ignore-installed pyOpenSSL --upgrade
sudo -H pip install ndg-httpsclient
Thanks everybody for helping me out with this!
Automatic OBD-II FYI - Exception caught _requestAccessToken: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)
Automatic OBD-II FYI - Exception caught saving access token: No JSON object could be decoded
Automatic OBD-II unable to save access_token
Error (client) performRequestMethod() caught exception: ServerRequestError -- server request canceled
jay (support) wrote:As initialized upon program startup, the first item of the path list (PYTHONPATH), path[0], is the directory containing the script that was used to invoke the Python interpreter. So, yes, any modules placed there would be found automatically. However, for reasons you note, as well as better management of modules when there are more than just a few, placing them in a sub-folder is quite convenient.You don't really have to do that - just put the module at the same directory level as plugin.py and it should work. I believe they will also be first on the PYTHONPATH so they should supercede any others (though I'm not positive on this point)...
install_requires=[
'requests>=2.7.0',
'six',
'websocket-client',
],
berkinet wrote:jay (support) wrote:As initialized upon program startup, the first item of the path list (PYTHONPATH), path[0], is the directory containing the script that was used to invoke the Python interpreter. So, yes, any modules placed there would be found automatically. However, for reasons you note, as well as better management of modules when there are more than just a few, placing them in a sub-folder is quite convenient.You don't really have to do that - just put the module at the same directory level as plugin.py and it should work. I believe they will also be first on the PYTHONPATH so they should supercede any others (though I'm not positive on this point)...
jay (support) wrote:... it wasn't immediately clear that your assumption was correct. It does look like we modify the path to ensure that the Server Plugin folder is the first on the path so that modules there will be found first...
Path=:
[
'./Modules',
u'/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Automatic OBD-II.indigoPlugin/Contents/Server Plugin',
u'/Applications/PyCharm.app/Contents/debug-eggs/pycharm-debug.egg',
u'/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Library/Python/2.7/site-packages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC'
]
DVDDave wrote:dgarozzo wrote:Ok everybody. I think I got it working again. I promise this worked before! Please get the latest from GitHub.
I've moved everything to use Requests instead of httplib.HTTPSConnection. I also added a checkbox to simplify things while you wait for location information from Automatic.
I have not bundled in the libraries yet. I will try to work on that later. You may need to do the following:
- Code: Select all
sudo -H pip install -U requests[security] --ignore-installed six
sudo -H pip install --ignore-installed pyOpenSSL --upgrade
sudo -H pip install ndg-httpsclient
Thanks everybody for helping me out with this!
Didn't work for me, even when I used pip2.7. Modules installed successfully but I got the following errors in the log when I tried to obtain the access token:
- Code: Select all
Automatic OBD-II FYI - Exception caught _requestAccessToken: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)
Automatic OBD-II FYI - Exception caught saving access token: No JSON object could be decoded
Automatic OBD-II unable to save access_token
Error (client) performRequestMethod() caught exception: ServerRequestError -- server request canceled
dgarozzo wrote:So you updated to the new code, and you ran the pip install for the four commands (both with pip and pip2.7)?
I hate to say it, but can you cycle your computer?
dgarozzo wrote:I'm not following what your complaint is about. What app launches and takes over the entire screen? Is that related to Indigo and the plugin?Dewster35 wrote:Very awesome. I've been meaning to take some time to get my two vehicles more integrated and have had the automatic devices for quite some time. My only real complaint is how the app launches and takes over the entire screen when it initially connects.
DVDDave wrote:dgarozzo wrote:So you updated to the new code, and you ran the pip install for the four commands (both with pip and pip2.7)?
I hate to say it, but can you cycle your computer?
Ah, I forgot to restart after using pip2.7. Works now. Thanks!
--Dave
sudo -H pip2.7 install -U socketIO-client --ignore-installed six
File "/usr/local/bin/pip2.7", line 7, in <module>
from pip import main
ImportError: No module named pip
lanbrown wrote:If you want to see what version of Python you have, issue the the following command from the terminal:
python --version
Pip is not Python.
Dewster35 wrote:Python 2.7.10 is the version of python I am installing.
which is perhaps why I was mixing up the two. Is there a straighforward way to go about installing? I've found this: https://packaging.python.org/tutorials/ ... -packages/
but it is still giving me the No module named pip error message.
sudo easy_install pip
Users browsing this forum: No registered users and 5 guests