Tag Archives: Solve the problem

ERROR: This system does not support “RDRAND“ [How to Solve]

Problem phenomenon:

When running DPDK app programs in some environments, the following problems may occur:

Solution:

Before compiling, you can use the grep command in the DPDK root directory to check where there is a configuration setting about RDRAND, here there is a relevant configuration inside the first meson.build.

After opening the file, you can find that RDRAND is iterated through the optional_flags, so delete the above iterated items and recompile.

Summary:

The reason here is that RDRAND is an instruction set of CPUs. Not all CPUs support this instruction. In order to make the program universal, we can delete this configuration when compiling, so that we can run on CPUs that do not support RDRAND.

[Solved] error ‘xxx‘ is never reassigned. Use ‘const‘ instead prefer-const

If let or var variables are used to declare in TS, an error will appear:

Slint: identifier ‘errmsg’ will never be reassigned; Use ‘const’ instead of ‘let’. (prefer const)

code snippet:

Solution:

1. Use const to declare
2. Open tslint.json file under the project, set prefer-const to false.

Yarn vue3 modify the name of the source file Error [Solved]

ERROR Failed to compile with 1 error PM 6:26:46
This relative module was not found:
* ./RoleFormDialog in ./node_modules/cache-loader/dist/cjs.js??ref–13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref–1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref–1-1!./src/views/Role/List.vue?vue&type=script&lang=js

Solution:
Also change the directory where the source file is located to any other name (here it is changing Role to RoleAAA) and then change back to the original name (here it is changing back to Role), yarn will automatically clear the cache and the problem is solved.

 

[Solved] socketio.exceptions.ConnectionError: OPEN packet not returned by server

Error Messages:
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/home/comz/anaconda3/envs/arcface/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/home/comz/anaconda3/envs/arcface/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "usb_camera.py", line 140, in <lambda>
    Process(target=lambda: asyncio.run(upload_loop())).start()
  File "/home/comz/anaconda3/envs/arcface/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/home/comz/anaconda3/envs/arcface/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "usb_camera.py", line 51, in upload_loop
    await sio.connect(url)
  File "/home/comz/anaconda3/envs/arcface/lib/python3.7/site-packages/socketio/asyncio_client.py", line 117, in connect
    raise exceptions.ConnectionError(exc.args[0]) from None
socketio.exceptions.ConnectionError: OPEN packet not returned by server

Solution:

pip install python-engineio==3.14.2 python-socketio==4.6.0

An error of 500 is reported when an item is assigned to a role

Original: void addrolesbyuserid (string [] roleids, string userid);

After modification: void addrolesbyuserid (@ param (“roleids”) string [] roleids, @ param (“userid”) string userid);

Error reason: roleides is not found, and the roleides parameter is not detected by SQL statement

Solution: add the @ param annotation to specify the parameters of the incoming SQL statement

Solve the problem of incorrect display of dialogfragment width

I wrote a download box. Relative layout for layout files   I wrote it. It is found that the width cannot be set on Android 11 devices. The layout controls are stacked together.

Solution:

1. Wrap the outermost layer with FrameLayout and match the width and height_ parent

 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <RelativeLayout
        android:id="@+id/bg"
        android:layout_width="600dp"
        android:layout_height="wrap_content"
        android:background="@drawable/bg"
        >
		
		Other sub-controls
</RelativeLayout>
</FrameLayout>

To solve the running error of eclipse for C / C + +: launch failed binary not found

sometimes we don’t like to use vs. Dear friends, like to use the eclipse practice c/c + + code, the construction of the environment, portal: http://jingyan.baidu.com/article/17bd8e523d7b9185ab2bb8f2.html

and then you might follow all the above steps and still hang when you run, and then you need to check the following two places:

1. If you haven’t built the project, click on the following position to build it and run it again. If not, scroll down to see

2. Change one setting :



Worker failed to boot

the following error no detailed information, don’t know what went wrong code

Traceback (most recent call last):
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 203, in run
    self.manage_workers()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 545, in manage_workers
    self.spawn_workers()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 617, in spawn_workers
    time.sleep(0.1 * random.random())
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
    self.reap_workers()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

Just add the parameter — preload to the gunicorn command to see the detailed error message
. Add the parameter and the error message is:

Traceback (most recent call last):
  File "/home/charleswu/.virtualenvs/process/bin/gunicorn", line 11, in <module>
    sys.exit(run())
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/base.py", line 223, in run
    super(Application, self).run()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 60, in __init__
    self.setup(app)
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 120, in setup
    self.app.wsgi()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/home/charleswu/AiDoctor/process_bchao/app.py", line 44, in <module>
    app = create_application()
  File "/home/charleswu/AiDoctor/process_bchao/app.py", line 31, in create_application
    from webapi import image_api
  File "/home/charleswu/AiDoctor/process_bchao/webapi/__init__.py", line 3, in <module>
    from .upload_image import image_api
  File "/home/charleswu/AiDoctor/process_bchao/webapi/upload_image.py", line 9, in <module>
    from interface import get_b_result
  File "/home/charleswu/AiDoctor/process_bchao/interface.py", line 6, in <module>
    from structuration import Struct
  File "/home/charleswu/AiDoctor/process_bchao/structuration.py", line 7, in <module>
    from split_word import desc_list, diag_list
ModuleNotFoundError: No module named 'split_word'

done!!!


Gunicorn reported error worker failed to boot

the following error no detailed information, don’t know what went wrong code

Traceback (most recent call last):
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 203, in run
    self.manage_workers()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 545, in manage_workers
    self.spawn_workers()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 617, in spawn_workers
    time.sleep(0.1 * random.random())
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
    self.reap_workers()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

Just add the parameter — preload to the gunicorn command to see the detailed error message
. Add the parameter and the error message is:

Traceback (most recent call last):
  File "/home/charleswu/.virtualenvs/process/bin/gunicorn", line 11, in <module>
    sys.exit(run())
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/base.py", line 223, in run
    super(Application, self).run()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 60, in __init__
    self.setup(app)
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 120, in setup
    self.app.wsgi()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/home/charleswu/AiDoctor/process_bchao/app.py", line 44, in <module>
    app = create_application()
  File "/home/charleswu/AiDoctor/process_bchao/app.py", line 31, in create_application
    from webapi import image_api
  File "/home/charleswu/AiDoctor/process_bchao/webapi/__init__.py", line 3, in <module>
    from .upload_image import image_api
  File "/home/charleswu/AiDoctor/process_bchao/webapi/upload_image.py", line 9, in <module>
    from interface import get_b_result
  File "/home/charleswu/AiDoctor/process_bchao/interface.py", line 6, in <module>
    from structuration import Struct
  File "/home/charleswu/AiDoctor/process_bchao/structuration.py", line 7, in <module>
    from split_word import desc_list, diag_list
ModuleNotFoundError: No module named 'split_word'

done!!!


Specify the configuration file when the spring boot command starts

has the following scenario :

deputy general manager needs to deploy the system. The system is written by spring boot + gradle, but it is written according to the module. It is packaged as war package, and

is used

Java – jar XXX. War

problem comes, database configuration needs to be changed, port needs to be changed, various address changes, but the configuration file is in the package, cannot be changed. So you need to use the command to specify an external configuration file to specify the configuration

directly

java-jar-dspring.config. location=application.yml XXXX. War

command inside the application. The yml in the XXX. The war directory, at the same level can be specified, so that you can use the configuration files outside the inside of the cover off the war file configuration file.

is done.

The JSON object is converted into a formdata object, and the formdata object is converted into a JSON object

in the backward request, if there is a file object in the uploaded data, we need to use the form submission, at this time we need to convert the JSON object into a formData object, see the code

for details

  const formData = new FormData();
  Object.keys(params).forEach((key) => {
    formData.append(key, params[key]);
  });

may also require formData to be converted to JSON, the code is as follows:

  var jsonData = {};
  formData.forEach((value, key) => jsonData[key] = value);