So I think my Python Framework is completely broken.
I know this because my scripts work on a Windows 10 Machine without any issue, and when I try to check the version of python with which python
I get a bad option message. When I try to run any python scripts I get this:
richardbarret@1152-MBP ~/Git/SalesforceCLI/Python/Cases master ⍟3 python read_all_sev1_cases.py ✔ 1316 10:34:36
Traceback (most recent call last):
File "read_all_sev1_cases.py", line 14, in <module>
import simple_salesforce
File "/Users/richardbarret/Library/Python/2.7/lib/python/site-packages/simple_salesforce/__init__.py", line 4, in <module>
from .api import Salesforce, SFType
File "/Users/richardbarret/Library/Python/2.7/lib/python/site-packages/simple_salesforce/api.py", line 12, in <module>
from urllib.parse import urljoin, urlparse
ImportError: No module named parse
richardbarret@1152-MBP ~/Git/SalesforceCLI/Python/Cases master ⍟3 which python 1 ↵ 1317 10:34:41
type: bad option: -l
richardbarret@1152-MBP ~/Git/SalesforceCLI/Python/Cases master ⍟3 python -V 1 ↵ 1318 10:34:49
Python 2.7.16
richardbarret@1152-MBP ~/Git/SalesforceCLI/Python/Cases master ⍟3 pip -V ✔ 1319 10:34:52
pip 20.0.2 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
Furthermore, I recently tried uninstalling and re-installing with brew, whereas before it was working but I was unable to install the fire module through pip. The fix was to uninstall it, and now...I think I have broken the framework just to install one module. My macbook is almost completely useless right now for local pythonic development and it is hindering my workflows.
Okay so since someone down-voted it and didn't provide an explanation I am going to be as verbose as possible.
On my Macbook I try to run a python script that works with my Windows Machine:
PS C:\Users\richard.barrett\Git\Salesforce-CLI\Python\Cases> python -V
Python 3.8.0
PS C:\Users\richard.barrett\Git\Salesforce-CLI\Python\Cases> python .\read_all_handover_cases.py
The file does not exist encryption on secrets.json not in use
00DE0000000JFpb!AQwAQExSYpskesZsmLXq9jYeojeBC1px0ojrhLuxMYHpCBJgz6iM5jVqZxmFzp4sQHy6DvXhnNsQnw.0JGNolxziUpWJfdNI
0 1 2 3 ... 9 10 11 12
0 2910831 Technical Case Aleksandr Dobdin Pending ... false false false Sev3 (Normal)
1 3362385 Technical Case Bradley Shirley Pending ... false false false Sev4 (Low)
2 3492261 Technical Case Othmane Madjoudj Pending ... false false false Sev3 (Normal)
[3 rows x 13 columns]
Which is nice and what I would expect to see as well on my Macbook. However, for some odd reason my Python is not working and it is pointing to an older version on the macbook. I try to run the same script and I get the following:
richardbarret@1152-MBP ~/Git/SalesforceCLI/Python/Cases master ⍟3 python read_all_handover_cases.py ✔ 1320 10:35:06
Traceback (most recent call last):
File "read_all_handover_cases.py", line 14, in <module>
import simple_salesforce
File "/Users/richardbarret/Library/Python/2.7/lib/python/site-packages/simple_salesforce/__init__.py", line 4, in <module>
from .api import Salesforce, SFType
File "/Users/richardbarret/Library/Python/2.7/lib/python/site-packages/simple_salesforce/api.py", line 12, in <module>
from urllib.parse import urljoin, urlparse
ImportError: No module named parse
When I looked up the error it was saying I was running an old version of Python. I reinstalled it via brew, before all of the patch to to work with the python fire module...I had no issues and could run my scripts just fine from within the CLI.
Also, here is the python crash anytime I try to install something with pip:
Process: Python [56510]
Path: /usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.7.7 (3.7.7)
Code Type: X86-64 (Native)
Parent Process: zsh [46993]
Responsible: iTerm2 [838]
User ID: 502
Date/Time: 2020-04-24 11:47:24.835 -0500
OS Version: Mac OS X 10.15.4 (19E287)
Report Version: 12
Anonymous UUID: 229910A5-BB3B-6822-3072-5658F7AEAFD4
Sleep/Wake UUID: 7FFE90BD-04FC-4B46-85DE-012621D1B4B4
Time Awake Since Boot: 59000 seconds
Time Since Wake: 4600 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
/usr/lib/libcrypto.dylib
abort() called
Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI.
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff734d933a __pthread_kill + 10
Though I have always had that issue from before, when I would try to invoke a script that was not marked as executable with python3 some_script_needing_version_3.py
.