- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
<分区>
几天前,我在 Googletrans 中使用翻译功能写了几行。但我今天试图重新运行这些线路,却出现了一系列错误……我对此感到非常困惑。如果您遇到类似问题,请在下面发表评论。欢迎任何帮助!!
from googletrans import Translator
translator = Translator()
trans1 = translator.translate('Hello', dest = 'es')
我得到的错误如下:
AttributeError Traceback (most recent call last)
<ipython-input-19-c0f9e5495a2f> in <module>()
----> 1 trans1 = translator.translate('Hello', dest = 'es')
~\AppData\Local\Continuum\anaconda3\lib\site-packages\googletrans\client.py in translate(self, text, dest, src)
170
171 origin = text
--> 172 data = self._translate(text, dest, src)
173
174 # this code will be updated when the format is changed.
~\AppData\Local\Continuum\anaconda3\lib\site-packages\googletrans\client.py in _translate(self, text, dest, src)
73 text = text.decode('utf-8')
74
---> 75 token = self.token_acquirer.do(text)
76 params = utils.build_params(query=text, src=src, dest=dest,
77 token=token)
~\AppData\Local\Continuum\anaconda3\lib\site-packages\googletrans\gtoken.py in do(self, text)
178
179 def do(self, text):
--> 180 self._update()
181 tk = self.acquire(text)
182 return tk
~\AppData\Local\Continuum\anaconda3\lib\site-packages\googletrans\gtoken.py in _update(self)
57 r = self.session.get(self.host)
58 # this will be the same as python code after stripping out a reserved word 'var'
---> 59 code = unicode(self.RE_TKK.search(r.text).group(1)).replace('var ', '')
60 # unescape special ascii characters such like a \x3d(=)
61 if PY3: # pragma: no cover
AttributeError: 'NoneType' object has no attribute 'group'
我试图研究这个错误消息,但一无所获。最让我困惑的是这个简单的代码在 3 天前运行得非常好。但是当我今天早上打开时,我弹出了错误。请帮忙。非常感谢!
无论我在做什么,我都会得到这个输出,但模拟器不会启动,新创建的模拟器也不会启动。我在 Windows 下: 警告:./android/base/files/IniFile.cpp:155:无法处理 .
我用 package.json NPM 脚本中像这样的变量: // package.json { "version": "0.12.1", "scripts": { "get-vers
几天前,Facebook 与我们网站的连接突然停止工作,代码没有任何更改??? Facebook 做了一些改变??? http://www.presbium.sk/vstup-pre-uchadzac
我习惯于 grunt build 任务成功完成,但由于我将我的项目编辑与其他开发人员同事合并,它突然失败并出现我以前从未见过的错误: grunt build Loading "imagemin.js"
我不明白这个。突然之间,我无法使用 iOS 9.0 中引入的 UIUserNotificationActionResponseTypedTextKey 标识符来访问通知中的文本输入消息。 Xcode
在我调用某个 Google 的 Youtube 库后,我的应用程序在其回调之一后突然变得完全没有响应。 无响应意味着无法点击所有 UI 组件。 在 iOS 中是否有这样的东西可以禁用整个屏幕完全不响应
bool queueIsFull(int rearPointer) { if(rearPointer==9) return 1; else return
我正在使用 PHP、Apache 和 MySQL 开发 Web 应用程序。在过去的一年中,此应用程序的响应时间一直不错。昨天,应用程序在 Firefox 上突然变得非常慢(完整的页面加载,包括 CSS
几个小时后,从控制台发出的 PHP 命令不再接受本地路径。例如在 laravel 中我总是给出命令 php artisan 但从今晚开始我收到了以下回复 Status: 404 Not Found C
我有一个 session WCF 服务,它生成一个进程并在调用 IsInitiating 操作时打开一个到该进程的命名管道。当调用 IsTerminating 操作时,服务会沿着管道发送一条消息,通知
类似的问题已经回答了好几次,我确实检查了其中的许多问题。这是不同的,请继续阅读。 我在 strings.xml 中定义了大量(大量)字符串,并带有多个格式参数。例如: %s and also %s 这
我有一个简单的消息机器人,它是根据 Messenger 平台指南设置的。在过去的几个月里,它一直运行良好,每天发送大约六条消息。我根本没有碰它,但是突然,发送消息,即调用 https://graph.
我正在使用 Unity 开发一款简单的 3D 手机游戏。我的目标是在没有垂直同步的情况下达到 30 FPS。我的游戏在所有 iOS 设备上运行良好,没有发热和节流,但有奇怪的 FPS 下降。 FPS
我们有一个自定义小部件,多年来一直运行良好,直到上周。 看来 Json 回调现在仅适用于播放列表,不适用于轨道。 播放列表 /**/jQuery31108094578850496614_1482167
-bash:/Users/winchenzo/git-completion.bash: 没有那个文件或目录 -bash:/Users/winchenzo/git-prompt.sh: 没有那个文件或目
编辑:重启解决了问题。我仍然想知道最初是什么原因造成的,因为这种情况以前发生过一次,但我不记得当时我做了什么来修复它(当时重新启动并没有解决问题)。 我 cd 到包含我要编辑的文件的文件夹,然后从命令
我刚刚注册是因为我突然遇到了一个问题,目前为止运行良好的代码我之前在这里找到了一些非常好的答案。希望你们能再次帮助我,这次甚至是投票;) $sql='SELECT projektKurz, proje
我制作了一个小程序,它在 tcp 套接字上监听和发送线路,并将接收到的信息附加到 JTextArea。我用它在 Minecraft 服务器上聊天,而无需打开游戏。 我昨晚工作得很好,但当我起床时却不工
感谢您在这里查看我的问题。 我正在使用 Glide 从 Firebase 存储中获取图像,基本上我是在使用 url 从存储中获取图像。第一天它工作正常但突然停止获取图像。我没有碰代码。我检查了很多答案
FCM 通知已到达所有 iOS 设备。但通知在大约 1 年前注册的某些设备上不起作用。 FCM token 和 APNs token 似乎没有变化。为什么没有到达通知? FCM token 是否必须过
我是一名优秀的程序员,十分优秀!