Author Archives: Robins

[Solved] python3.10 Error: cannot import name ‘Iterable‘ from ‘collections‘

Generally, errors will be reported when using the pyechards library for higher versions of Python:
cannot import name ‘iteratable’ from ‘collections’

Solution:
go to the directory where the pyecarts library is installed, enter the pyecarts file, open render, and continue to open engine Py file, where you can find the following code:

from collections import Iterable

Change to the following code:

from collections.abc import Iterable

Call through the following command, and no error will be reported again

from collections.abc import Iterable

[Solved] Input error: this. Getoptions is not a function

Reproduction steps:

1. The project was created using Vue cli

2. Install less4 x, less-loader10.X development dependency

3. After using lang = “less” in the single file Vue component, the compilation error is found, syntax error: typeerror: this getOptions is not a function

Reason: the version of less loader is too high. Uninstall and reinstall

// uninstall less
npm uninstall less-loader
npm uninstall less

// re-install less3.5.0、less-loader7.3.0
npm i -D [email protected]
npm i -D [email protected]

[Solved] Annotation Customize Error: ElementType cannot be resolved to a variable

In the development process, you may use custom annotations (this article uses custom annotations when using JWT) to report an error:

ElementType cannot be resolved to a variable

Manually import packages:

import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;

Perfect solution

[Solved] react-router-dom Error: <NavLink>activeClassName

Requirement: click the corresponding button to highlight

Error code:

Demo is the style class name corresponding to the highlight

<NavLink activeClassName="demo" className="list-group-item" to="/about">About</NavLink>
<NavLink activeClassName="demo" className="list-group-item" to="/home">Home</NavLink>

Error message:

It is said that react does not recognize the activeclassname attribute of the small hump writing method. It is recommended to change it to lowercase. After changing it to lowercase activeclassname, no error will be reported, but the style does not take effect.

Later, I found out that my react router DOM version is the latest version: 6.0 2:

In the new version, the active classname attribute is no longer used to highlight naclink. Instead, it is implemented directly in the classname as a callback function.

Change to the following code:

<NavLink className={({isActive}) => 'list-group-item' + (isActive ?' demo' : '')} to="/about">About</NavLink> 
<NavLink className={({isActive}) => 'list-group-item' + (isActive ?' demo' : '')} to="/home">Home</NavLink>

Note: a space should be added before “demo”. Otherwise, when clicking the button to trigger the active state, it will return to “list group itemdemo” (string splicing, if no space is added, the front and rear class names will be connected together), resulting in the ineffective CSS style.

[Solved] QT error: the packaged exe of Enigma virtual box reports an error cannot load library qt5core.dll

Question:

Put the enigma virtual box packaged exe to another computer for use, and an error will be reported when opening the EXE: cannot load library qt5core DLL
(in fact, the library qt5core.DLL is included when using enigma virtual box)

reason:

This is not the lack of qt5core DLL , nor is there a problem with this library. Because [problem solving] the code cannot be executed because libgcc_s_dw2-1.dll, libwinpthread.dll and libstdc + ± 6.dll cannot be found. Reinstallation may solve this problem. This problem is caused by the lack of libgcc_s_dw2-1.DLL, libwinpthread.DLL, libstdc + + - 6.dll , but the error cannot be reported after packaging load library Qt5Core.DLL, the analysis may be because qt5core DLL depends on the above libraries to run.

 

Solution:

From Qt5 12.0\5.12.0\mingw73_64\bin (different versions and different directories) copy the three dynamic libraries libgcc_s_dw2-1.DLL, libwinpthread.DLL, libstdc + + - 6.DLL , and then use the EXE packaged with enigma virtual box to avoid errors.

comparison of directories before and after modification:

[Solved] kettle Error: GC overhead limit exceeded

An error is reported when running a kettle script online

 java.lang.OutOfMemoryError: GC overhead limit exceeded 

The reason is that the memory settings of the local test are different from the online memory settings, and the memory size configured on the offline can be modified.

Spoon. The memory set in bat (windows side) and spoon.sh (Linux side) is too small. It can be set to 1/4 of the machine memory, such as 16g memory, which can be set to 4G.

– XMS initial heap size.
– Xmx maximum heap size.

In many cases, – XMS and – Xmx are set to the same. This setting is because when heap is not enough, memory jitter will occur, affecting the stability of program operation.

[Solved] PYNQ load bit error: KeyError: ‘interrupts‘

Problem Description:

In the BD diagram of vivado, the interrupted direct connection between my IP and PS Core

An error occurs when loading the bit file generated by vivado in pynq

Solution:

Add a concat block in the connection between PS and our own IP interrupt line, as shown in the figure below

finally, the bit file can be successfully loaded in pynq

and the final program can output correct results