Tag Archives: bug

[solved] pychar starts to report internal error after updating version 2020.1

Problem description

Today, I have nothing to do to update pychar community 2020.1, and then start it up. I found that I directly reported an error

(I forgot to take a screenshot of the source network)

Cause of error

I don’t quite understand the details, but maybe it’s a plug-in conflict?

resolvent

Refer to the answer to this question
pcharm community: internal error

The issue is known https://youtrack.jetbrains.com/issue/IDEA-237012 , please upvote and feel free to leave comments.Right now, you could either downgrade to 2019.3.4 or start IDE with default settings by renaming/removing the configuration and plugins folders https://www.jetbrains.com/help/pycharm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html

Just as he said, delete the plugin directory during installation and you can start it normally!!

The path of plugins directory
win10 system is as follows
syntax

%APPDATA%\JetBrains<product>\plugins

Example

C:\Users\JohnS\AppData\Roaming\JetBrains\PyCharm2020.1\plugins

In my computer, it is

Idea introduces dependency and starts jar error in opening zip file

Question:

reason:

When Maven download is dependent, the jar may not be downloaded to the local normally due to network reasons. If you start the project reference, an error will be reported, and the local Maven jar cannot be used normally

terms of settlement:

There is a stupid way to find out which jars are open with errors. Find the corresponding jars in the local Maven repository and delete them, pom.xml After testing, no error will be reported

Solve the ‘UTF-8’ codec can’t decode byte 0xe9 in position 3114: invalid continuation byte error

Today, when using Python to open a file, the following error was reported:

the code is as follows:

movies = pd.read_table('../../dataset/ml-1m/movies.dat', sep='::', header=None, engine='python', encoding='utf-8').to_numpy()

Solution:
change the code to: iso-8859-1 just

movies = pd.read_table('../../dataset/ml-1m/movies.dat', sep='::', header=None, engine='python', encoding='ISO-8859-1').to_numpy()

After the model is instantiated by keras, the result returns nonetype

terms of settlement

Uninstall keras and then re install:

pip uninstall keras
pip install -i pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ keras

Analysis of the cause of error report

The probability of this kind of problem is that you directly use pychar to install keras . There is something wrong with pychar, the installation package of keras!

MySQL error: 1005 can’t create table (error: 150)

Cause of error:

1. The type or size of the two fields do not strictly match. For example, if one of them is int (10), then the foreign key must also be set to int (10), not int (11), and it cannot be tinyint. You can use the show command to view the size of the field, because some query browsers sometimes display int (10) and int (11) as integer. In addition, it is necessary to confirm whether both fields are signed or not, and the two fields must be strictly matched all the time.

2. When an attempt is made to refer to one of the foreign keys, which is not indexed or is not primary key, an index must be created for this foreign key.

3. The name of a foreign key is an existing key value. You should make sure that the foreign key name is unique, or add several characters randomly after the key name to test whether this is the reason.

4. If you want to use foreign key constraints, one or two of the tables representing the MyISAM engine must be InnoDB engine (if both tables are MyISAM engines, this error will not occur at all, but foreign keys will not be generated).

5. It is possible that on delete set null is set, but the related key field is set to not null. You can fix this bug by modifying the property value of cascade or setting the field property to allow null.

6. Make sure your charset and collate options are consistent at the table and field levels.

7. A default value may be set for the foreign key, such as default = 0

8. In this relationship, one of the fields is one of the mixed key values. It does not have its own independent index, so it is necessary to create an independent index for it.

9. Error in alert declaration.

10. The two tables to be joined have different encoding formats.

Refer to Baidu document: https://wenku.baidu.com/view/7a0a1f1b10a6f524ccbf85e6.html

java.lang.IllegalArgumentException : could not get next sequenced ID for sequence name: Visitor solution

HTTP Status 500 – Could not get next sequenced ID for sequence name: Visitor

 

 

type Exception report
message Could not get next sequenced ID for sequence name: Visitor
description The server encountered an internal error that prevented it from fulfilling this request.
exception

java.lang.IllegalArgumentException: Could not get next sequenced ID for sequence name: Visitor
	org.ofbiz.entity.GenericDelegator.getNextSeqId(GenericDelegator.java:2515)
	org.ofbiz.entity.GenericDelegator.getNextSeqId(GenericDelegator.java:2503)
	org.ofbiz.entity.GenericEntity.setNextSeqId(GenericEntity.java:626)
	org.ofbiz.entity.GenericDelegator.createSetNextSeqId(GenericDelegator.java:789)
	org.ofbiz.webapp.stats.VisitHandler.getVisitor(VisitHandler.java:245)
	org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:206)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:326)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.33 logs.


Apache Tomcat/8.0.33

The database uses MySQL and is configured to start automatically, but it was shut down unexpectedly, resulting in an error.

 

 

 

 

io.UnsupportedOperation : not writable exception resolution

Today, when doing Python language sense exercise, I reported the following exception:

is the red exception
this is the red exception io.UnsupportedOperation : not writable

Write permission is not supported. After a careful inspection, I found that I forgot to set the permissions when I opened the file for the first time, so after I added it, the program ran successfully!!!

Error running app:Instant Run requires Tools | Android Enable ADB integration‘ to be enabled.

Error generation environment

The
is generated when running the project in Android studio

Error description

Error running app:Instant Run requires Tools | Android Enable ADB integration' to be enabled.

Cause of error

The project can be started normally before, but it can’t be started after Android studio upgrade

terms of settlement

In the options bar, click Tools – & gt; Android – & gt; enable ADB integration


after modification, it is as follows:
there is a tick in front of enable ADB integration.

Idea access denied for user ‘xxx’ @ ‘localhost’ solution

Solutions to access denied for user ‘xxx’ @’localhost ‘problem

Key to error reporting

java.sql.SQLException : access denied for user ‘xxx’ @’localhost ‘(using password: Yes). Note that XXX here is not root, root is a permission problem

Solution

Change the user name for the configuration file

You can choose any name you like

And then 🆗 It’s over

Cause analysis

The framework did not get the correct user name of datasource, which is related to the configuration. When such a framework constructs an instance of abstractdriverbaseddatasource, the user name it gets is always the current machine name, that is, XXX. The underlying reason is not clear.

Servlet error: no interface expected here

No interface expected here error was encountered when implementing the code. Idea was not compiled. No interface expected here means there is no interface.

resolvent

After a look around, we found that servlet is an interface, not a class. Httpservlet is an abstract class, so when we change it to servlet, we need to change extensions to implements.

Change extend to implements

 

 

 

Vs2019: solution nvcc total: cannot find compiler‘ cl.exe ‘ in PATH

vs2019:nvcc fatal : Cannot find compiler ‘ cl.exe ‘ in PATH

Three steps:

    Step 1:
    add the following two positions to the nameless variable path list of system variables
    Step 2:
    create a new variable named Lib, add three locations for it: C: program files (x86), Microsoft Visual Studio, 2019, community, VC, tools, MSVC, 14.27.29110, lib, x64
    C: program files (x86), windows kits, 10, lib, 10.0.18362.0, ucrt, x64
    C: Program files (x86), windows kits, 10, lib, 10.0.18362.0, um, x64 step 3:
    create a new variable named include in the system variable, and add 2 Location: C: program files (x86) – Microsoft Visual Studio (2019) – Community (VC) – tools – MSVC (14.27.29110) – include
    C: program files (x86) – Windows kits (10) – lib (10.0.18362.0) – ucrt

Reference article: http://iliutong.cn/2019/01/20/nvcc-cu-file-in-console-in-windows/

TypeError: Required argument ‘mat‘ (pos 2) not found

Traceback (most recent call last):
  File "/Users/*******/*****.py", line 225, in <module>
    cv2.imshow(r_image)
TypeError: Required argument 'mat' (pos 2) not found

This error prompt means that the required parameter is not found, that is, the function in the code is missing the necessary parameter.

cv2.imshow()

There should be two parameters: one is the name of the image window, namely title, and the other is the pixel value matrix of the displayed image.
In addition, the data type of the matrix is np.uint8 , floating point type will display exception.
Error will be reported:

TypeError: img is not a numpy array, neither a scalar

Solution:
transform the data type

image = numpy.array(image)