小编Lut*_*ris的帖子

“EntryPoints”对象没有属性“get” - 数字海洋

我已经对 Digital ocean 进行了部署,在登台(Heroku 服务器)上该应用程序运行良好,但 Digital ocean 失败并出现以下错误,可能是什么问题:

AttributeError at /admin/
'EntryPoints' object has no attribute 'get'
Request Method: GET
Request URL:    https://xxxx/admin/
Django Version: 3.1
Exception Type: AttributeError
Exception Value:    
'EntryPoints' object has no attribute 'get'
Exception Location: /usr/local/lib/python3.7/site-packages/markdown/util.py, line 85, in <module>
Python Executable:  /usr/local/bin/python
Python Version: 3.7.5
Python Path:    
['/opt/app',
 '/usr/local/bin',
 '/usr/local/lib/python37.zip',
 '/usr/local/lib/python3.7',
 '/usr/local/lib/python3.7/lib-dynload',
 '/usr/local/lib/python3.7/site-packages',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf']
Server time:    Sun, 02 Oct 2022 21:41:00 +0000
Run Code Online (Sandbox Code Playgroud)

python django digital-ocean

76
推荐指数
4
解决办法
4万
查看次数

Bitbucket 上的 Dependencybot 或类似免费工具

任何人都知道任何在线免费工具,例如Github for bibucket 的dependentabot,机器人可以在 bitbucket 上提出 Pull 请求,以防依赖项有更新?我想在Django项目上使用它

python django bitbucket

10
推荐指数
1
解决办法
1644
查看次数

如何在Android中正确显示阿拉伯字母?

我的应用程序显示阿拉伯语言的字母和单词.但这些字母看起来不对.例如符号ب和ش:

正确(来自iOS):

正确

错了(来自Android):

错误

如您所见,字母顶部的小线必须居中.但事实并非如此.如何在iOS上显示阿拉伯语符号?

更新:我正在尝试使用Better-Arabic-Shapper,但它也显示不正确:

更好阿拉伯语的Shapper

更好阿拉伯语的Shapper

我正在尝试使用下面的代码设置自定义字体(Arial,Simpo,nassim_latn_rg),但它也无法正常工作:

private const val FONT_PATH = "fonts/"

val font = "nassim_latn_rg.otf"
val typeface = Typeface.createFromAsset(context.assets, FONT_PATH + font)
textView.typeface = typeface
Run Code Online (Sandbox Code Playgroud)

android arabic textview

9
推荐指数
1
解决办法
626
查看次数

命令"echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a"失败并在1期间退出

特拉维斯与Android开发一起新建,我的构建失败,因为我指出的错误标题,我一直在阅读文档,我试图实现它,但仍然,构建失败.

我失败的构建的链接如下 https://travis-ci.org/huxaiphaer/ConvergeLevelApp

以下是特拉维斯的错误.

$ java -Xmx32m -version

java version "1.8.0_144"

Java(TM) SE Runtime Environment (build 1.8.0_144-b01)

Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

$ javac -J-Xmx32m -version

javac 1.8.0_144

0.46s$ echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a

Error: Target id is not valid. Use 'android list targets' to get the target ids.

The command "echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a" failed and exited with …
Run Code Online (Sandbox Code Playgroud)

java android travis-ci

8
推荐指数
1
解决办法
341
查看次数

Fastlane &amp; Flutter - Google Api 错误:无效请求 - 未配置访问。谷歌播放

运行此命令后使用 Fastlane 和 Flutter 时导致此错误的原因:

bundle exec fastlane beta

Google Api 错误:请求无效 - 未配置访问权限。Google Play Developer API 之前未在项目中使用或已禁用。通过访问https://console.developers.google.com/apis/api/androidpublisher.googleapis.com/overview?project=xxxx启用它, 然后重试。如果您最近启用了此 API,请等待几分钟,让操作传播到我们的系统并重试。

当服务帐户启用并使用发布管理器链接到 Play 商店帐户时,我在 github 上阅读了不同的对话,但我无法得到明确的答案,自从我上传了一个后,我尝试增加我的 APK 的版本,但没有运气。

这是我的代码Fastfile

update_fastlane

default_platform(:android)

platform :android do
  desc "Runs all the tests"
  lane :test do
    gradle(task: "test")
  end

  desc "Deploy an beta new version to the Google Play"
  lane :beta do
       gradle(
           task: 'assemble',
           build_type: 'Release'
         )
     upload_to_play_store(track: 'beta',
     version_code: 5,
     aab: '../build/app/outputs/bundle/release/app-release.aab',
     )
   end
end
Run Code Online (Sandbox Code Playgroud)

然后它也在某处说:

[11:16:18]: Couldn't find …
Run Code Online (Sandbox Code Playgroud)

android fastlane flutter

8
推荐指数
1
解决办法
1447
查看次数

TypeError:list对象不是迭代器

我试图在flask-python中创建一个简单的post api,但是我收到了这个错误:

TypeError: list object is not an iterator
Run Code Online (Sandbox Code Playgroud)

但当我修改我的代码似乎很好可能是什么问题.

我的功能特别有问题:

def post(self,name):
        #return {'message': name}
        item = next(filter(lambda x: x['name'] == name, items), None)
        if item:
            return {'message':"An item with name '{}' already exixts. ".format(name)},400
        data = request.get_json()
        item = {'name': name, 'price':data['price']}
        items.append(item)
        return item, 201
Run Code Online (Sandbox Code Playgroud)

当我尝试在邮递员上发布某些内容时,我收到此logcat 错误:

[2018-06-07 10:41:02,849] ERROR in app: Exception on /item/test [POST]
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Python27\lib\site-packages\flask\app.py", line …
Run Code Online (Sandbox Code Playgroud)

python flask

6
推荐指数
2
解决办法
5941
查看次数

如何在 React CKEDITOR 中添加占位符

我已经阅读了关于 React Context 的 ckeditor 文档,但我找不到如何在 CKEditor 上创建占位符。

这是 react ckeditor react ckeditor的链接

这是示例代码:

<CKEditor
    onInit={editor => {
        // Insert the toolbar before the editable area.
        editor.ui.view.editable.element.parentElement.insertBefore(
        editor.ui.view.toolbar.element,
        editor.ui.view.editable.element);}}
        name={this.state.body}
        onChange={this.handleEditorChange}
        editor={DecoupledEditor}
        data={this.state.body}
        />
Run Code Online (Sandbox Code Playgroud)

javascript ckeditor reactjs ckeditor5

6
推荐指数
1
解决办法
1719
查看次数

如何在警报管理器中满足计划时间列表以推送通知

我正在尝试将存储在Sqlite中的时间列表 (具有小时和分钟)检索到警报管理器中,以通过通知执行提醒。我的方法是将存储在Sqlite中的所有计划时间循环到警报管理器中,以根据存储的时间列表执行通知,但是通知不会发出哔声。

但是当我指定一个时间(小时和分钟)时,它可以工作。以下是有效的代码示例,但我不希望这样:

alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, 10);
calendar.set(Calendar.MINUTE, 45);
Intent myIntent = new Intent(ListRemainder.this, AlarmReceiver.class);
pendingIntent = PendingIntent.getBroadcast(ListRemainder.this, 0, myIntent, 0);
alarmManager.set(AlarmManager.RTC, calendar.getTimeInMillis(), pendingIntent);
Run Code Online (Sandbox Code Playgroud)

但是,当要循环几个时间表时,它不起作用,这是我想要的方法,下面是代码示例,我还缺少什么?

//listOfTime is the one which contains the list of stored scheduled time in Sqlite.
for (int i = 0; i < listOfTime.size(); i++) {
    int hour = Integer.parseInt(listOfTime.get(i).toString().substring(0, 2));
    int minute = Integer.parseInt(listOfTime.get(i).toString().substring(3));
    System.out.print("Hour : " + hour + " Minute : " + minute);
    Log.d("MyActivity", "Alarm …
Run Code Online (Sandbox Code Playgroud)

java sqlite android alarmmanager android-notifications

5
推荐指数
1
解决办法
192
查看次数

Flutter - 命令 PhaseScriptExecution 失败,退出代码非零

我正在尝试存档和构建 flutter IOS 项目,以便最终生成 IPA,但由于此错误而苦苦挣扎,我尝试遵循有关我无法解决的类似问题的现有问题:

../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:26: Error: Type 'DiagnosticableMixin' not found.
class PictureStream with DiagnosticableMixin {
                         ^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:44: Error: Type 'DiagnosticableMixin' not found.
abstract class PictureStreamCompleter with DiagnosticableMixin {
                                           ^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:7: Error: The type 'DiagnosticableMixin' can't be mixed in.
class PictureStream with DiagnosticableMixin {
      ^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:16: Error: The type 'DiagnosticableMixin' can't be mixed in.
abstract class PictureStreamCompleter with DiagnosticableMixin {
               ^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:167:11: Error: Superclass has no method named 'debugFillProperties'.
    super.debugFillProperties(properties);
          ^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:171:30: Error: The method 'toStringShort' isn't defined …
Run Code Online (Sandbox Code Playgroud)

xcode ios flutter

5
推荐指数
2
解决办法
6560
查看次数

验证仅接受带有 yup 的选择器的两个特定字段

在选择器中只允许两个指定值的最佳方法是什么,例如我有 2 个字段供用户选择:

  1. 我们

  2. UGX

下面是我的代码片段:

验证码:

const signUpSchema = Yup.object().shape({
    countrySelector: Yup.string().required('Please select the country'),
    
});
Run Code Online (Sandbox Code Playgroud)

JSX 片段

<Formik
                        validationSchema={signUpSchema}
                        onSubmit={handleSignUpAsync}
                        initialValues={{
                            countrySelector: '',
            
                        }}
                    >
                        <Form>
                            <Field
                                as="select"
                                className="browser-default custom-select"
                                name='countrySelector'>
                                <option value="-">-</option>
                                <option value="DE">DE</option>
                                <option value="US">US</option>
                            </Field>
                        </Form>
                    </Formik>
Run Code Online (Sandbox Code Playgroud)

javascript reactjs yup

5
推荐指数
1
解决办法
3649
查看次数