0

I am getting IO error because ~/.chirprc file is not found. The entire chirp sdk is downloaded from the official https://developers.chirp.io/downloads.

Also there is a Attribute error which seems to be getting ignored

  1. Ran the following commands:

    python setup.py install
    python setup.py build
    python example.py
    
  2. Exact error is:

    python example.py
    Traceback (most recent call last):
      File "example.py", line 102, in <module>
        main(args.c, args.i, args.o, args.b, args.s)
      File "example.py", line 56, in main
        sdk = ChirpConnect(block=block_name)
      File "C:\00_Work\01_Documents\09_Papers\05_Chirp\chirpsdk\connect.py", 
    line 392, in __init__
        self.read_chirprc(block)
      File "C:\00_Work\01_Documents\09_Papers\05_Chirp\chirpsdk\connect.py", 
    line 485, in read_chirprc
        raise IOError('Could not find a ~/.chirprc file')
    IOError: Could not find a ~/.chirprc file
    Exception AttributeError: "'ChirpConnect' object has no attribute '_sdk'" 
    in <bound method ChirpConnect.__del__ of <chirpsdk.connect.ChirpConnect 
    object at 0x0000000006CE4278>> ignored
    
  • After further debugging, this issue was solved. We have to save a _'.chirprc'_ file at _'C:\Users\\'_ location. A _'.chirprc'_ file is a config file that gets used by the application. Contents of this file can be copied from this [https://developers.chirp.io/applications](https://developers.chirp.io/applications) link. Just select PYTHON, copy the config data and paste it in the _'.chirprc'_ file. – Prakash Pali Jul 27 '19 at 15:16
  • Adding to previous comment: I have named the _'.chirprc'_ file as _'a.chirprc'_ file. As windows understands the _'.chirprc'_ as a extension. Had to rename it in _example.py_ file and _connect.py_ file. – Prakash Pali Jul 27 '19 at 15:23

1 Answers1

1

For anyone else landing on this page, documentation for the Python SDK can be found at https://developers.chirp.io/docs/getting-started/python.

The ~/.chirprc file works for me on Windows. You must be sure to save it in the same place as this path as output by Python.

import os
os.path.expanduser('~/.chirprc')
joextodd
  • 694
  • 4
  • 9