由于身份验证,Spotipy 无法在远程服务器上运行

发布于 2025-01-11 21:59:23 字数 400 浏览 6 评论 0原文

当我在我的个人计算机上运行时,我的程序运行良好,但是当我尝试在 PebbleHost 上的远程服务器上运行完全相同的代码时,我收到以下错误:

Couldn´t read cache at: .cache
Couldn´t write token to cache at: .cache

根据我收集的信息,这是因为我需要验证我的Spotify 的服务器,但是当我无法访问应该弹出的浏览器时,我不知道如何做到这一点。我唯一可以访问的是控制台,其中显示了我需要访问以进行身份​​验证的网址。然而,在我的个人机器上打开这个网址没有任何作用。

我没有网站,是否应该将重定向 uri 设置为 IP 地址而不是使用 localhost?如果是这样,我如何确定要使用的 IP 地址以及采取哪些步骤?

My program works fine when I run it on my personal machine, however when I try to run the exact same code on a remote server on PebbleHost, I get the following errors:

Couldn´t read cache at: .cache
Couldn´t write token to cache at: .cache

From what I've gathered this is because I need to authenticate my server for spotify, however I don't know how I can do that when I don't have access to the browser that is supposed to pop up. The only thing I have access to is the console, where does show the url I need to visit to do the authentication. However opening this url on my personal machine does nothing.

I don't have a website, should I set the redirect uri to an ip address instead of using localhost? If so how do I determine what ip address to use and what steps do I take?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文