I am trying to set up the ChirpSDK, but every time I configure and run the code, I get this error:
JavaScript
x
16
16
1
Traceback (most recent call last):
2
File "test.py", line 3, in <module>
3
chirp = ChirpSDK()
4
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chirpsdk/chirpsdk.py", line 395, in __init__
5
self.read_chirprc(block)
6
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chirpsdk/chirpsdk.py", line 501, in read_chirprc
7
raise IOError('Could not find a ~/.chirprc file')
8
OSError: Could not find a ~/.chirprc file
9
Exception ignored in: <function ChirpSDK.__del__ at 0x10fa31af0>
10
Traceback (most recent call last):
11
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chirpsdk/chirpsdk.py", line 422, in __del__
12
self.close()
13
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chirpsdk/chirpsdk.py", line 470, in close
14
if self._sdk:
15
AttributeError: 'ChirpSDK' object has no attribute '_sdk'
16
I realize that the error is saying that my .chirprc file is not being recognized, but I have no idea how to remedy this. I created a .chirprc file in my /Users/username/ path, and named it c.chirprc (as the Chirp getting started article suggests), but I am still getting this error. Is there another part that I am missing? Am I reading the instructions wrong?
Thanks
Advertisement
Answer
The Chirp configuration file should be placed at /Users/<username>/.chirprc
on macOS.
If you run ls -l ~/.chirprc
in the terminal, do you get any results? If it displays no such file or directory then you have not created the file correctly.