Environment
- UBUNTU 16.04
- Odoo 9
Problem
Today I came across the situation where after installing pysftp suddenly I won’t be able to start odoo again. I have tried to do
service odoo restart service odoo stop
service odoo start
When I have tried to uninstall pysftp, I was having SSL_ST_INIT error
Copy to Clipboard1
1 root@erp:~# pip uninstall pysftp
2 Traceback (most recent call last):
3 File "/usr/bin/pip", line 9, in
4 from pip import main
5 File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 13, in
6 from pip.exceptions import InstallationError, CommandError, PipError
7 File "/usr/lib/python2.7/dist-packages/pip/exceptions.py", line 6, in
8 from pip._vendor.six import iteritems
9 File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 64, in
10 vendored("cachecontrol")
11 File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
12 __import__(modulename, globals(), locals(), level=0)
13 File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in
14 File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in
15 File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 3, in
16 File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/__init__.py", line 53, in
17 File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 54, in
18 File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in
19 from OpenSSL import rand, crypto, SSL
20 File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in
21 SSL_ST_INIT = _lib.SSL_ST_INIT
22 AttributeError: 'module' object has no attribute 'SSL_ST_INIT'23
Solution
Step 1: Backup existing directory on OpenSSL and pyOpenSSL from dist-packages folder.
1 cp -r /usr/lib/python2.7/dist-packages/OpenSSL /tmp/
2 cp -r /usr/lib/python2.7/dist-packages/pyOpenSSL-0.15.1.egg-info /tmp/
Step 2: Remove directory OpenSSL and pyOpenSSL from dist-packages folder and install pyopenssl module
Copy to Clipboard1
1# rm -rf /usr/lib/python2.7/dist-packages/OpenSSL
2 # rm -rf /usr/lib/python2.7/dist-packages/pyOpenSSL-0.15.1.egg-info
3 # sudo pip install pyopenssl
Step 3: Start odoo service.
Tushar C
A seasoned tech enthusiast, holds the position of CEO at Silent Infotech and serves as the CTO at SpeedBot, an algorithmic trading platform. Renowned internationally as a speaker on emerging technologies, Tushar boasts over a decade of diverse experience in the tech industry. His journey commenced as a developer in a multinational corporation, and he later co-founded Silent Infotech alongside two other members. Tushar's expertise spans a multitude of technologies, including blockchain, AI, Python, Dotnet, and cloud solutions. He leverages his extensive knowledge to deliver a broad spectrum of enterprise solutions to businesses. A true technology master, Tushar excels in managing cloud infrastructure for large-scale enterprises. To learn more about his insights and expertise, connect with him.
Schedule Consultation with Tushar Schedule Now