简体   繁体   English

在我的 Chirp Python 应用程序中出现错误,我想我可能已经覆盖了我的 .chirprc 文件

[英]Getting an error in my Chirp Python App, think I may have overwritten my .chirprc file

I'm receiving an error where Chirp is having trouble identifying the sound board on my Raspberry Pi 3 when using the Python setup instructions.我收到一个错误,其中 Chirp 在使用 Python 设置说明时无法识别我的 Raspberry Pi 3 上的音板。 I suspect the issue is related to a user error on my part.我怀疑该问题与我的用户错误有关。 When performing the step I copied my credentials from my Applications page and pasted them into a text file which I saved as .chirprc (overwriting rather than pasting into the file)执行该步骤时,我从“应用程序”页面复制了我的凭据并将它们粘贴到我保存为 .chirprc 的文本文件中(覆盖而不是粘贴到文件中)

Here is an example (minus the specific values) of what my .chirprc file looks like:这是我的 .chirprc 文件的示例(减去特定值):

[default] app_key = xXxXXxxxXXXxxXXXxXxXXxXxx app_secret = xxXxXXXxXxxXXXxXXXXxXxXxxxXxxxXXxXxXxxxXXxXxXXxXxX app_config = XxXXXXxXxXxxxXxxxXXxXxXxxxXXxXxXXxXxXxxXxXXXxXxxXXXxXXXXxXxXxxxXxxxXXxXxXxxxXXxXxXXxXxX [默认] app_key = xXxXXXxxxXXXxxXXXxXxXXXxXxx app_secret = xxXxXXXxXxxXXXxXXXXxXxXxxxXxxxXXxXxXxxxXXxXxXXxXxX app_config = XxXXXXxXxXxxxXxxxXXxXxXxxxXXxXxXXxXxXXxXXXXxxxxXxXXX

I suspect in hindsight that there are other values that probably already existed in the file and is why your instructions say "...and paste into your ~/.chirprc file"事后看来,我怀疑文件中可能已经存在其他值,这就是为什么您的说明说“...并粘贴到您的 ~/.chirprc 文件中”

I'm thinking I can probably delete the directory, uninstall with pip3 and then re-install with pip3 to get the file back (I tried deleting the file I created and running pip3 again but that didn't populate the missing file).我想我可以删除目录,用 pip3 卸载,然后用 pip3 重新安装以取回文件(我尝试删除我创建的文件并再次运行 pip3 但没有填充丢失的文件)。

Any chance you can point me perhaps to where the .chirprc file may be sitting in the SDK or online in a github repo so I can do a copy and paste and then re-insert my credentials?您是否有机会向我指出 .chirprc 文件可能位于 SDK 中或在线 github 存储库中的位置,以便我可以进行复制和粘贴,然后重新插入我的凭据? Or perhaps paste the default .chirprc file online as a response.或者,可以在线粘贴默认的 .chirprc 文件作为响应。

Once I get this I think everything else should work properly on my Raspberry Pi 3一旦我得到这个,我认为其他一切都应该在我的 Raspberry Pi 3 上正常工作

This file must be created manually by the user, it is not created by the SDK.此文件必须由用户手动创建,不是由 SDK 创建的。

You simply need to copy the contents from the Python block at https://developers.chirp.io/applications into a .chirprc file in your user directory.您只需将https://developers.chirp.io/applications 上Python 块的内容复制到用户目录中的 .chirprc 文件中即可。

Try out the example athttps://github.com/chirp/chirp-python-examples/tree/master/demo and copy and paste any console messages here.尝试https://github.com/chirp/chirp-python-examples/tree/master/demo 上的示例,然后将任何控制台消息复制并粘贴到此处。

You will need to ensure that the same configuration is used in your .chirprc and the testing device.您需要确保在您的 .chirprc 和测试设备中使用相同的配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM