Tag Archives: Problem solving

JSON parse e rror: Invalid UTF-8 middle byte 0x3f;

Online Tomcat deployment of the project, running process, a table to modify data has been reported error, nothing in the local! Check the console log and report the following error

org.springframework.http.converter.HttpMessageNotReadableException: JSON parse e
rror: Invalid UTF-8 middle byte 0x3f; nested exception is com.fasterxml.jackson.
databind.JsonMappingException: Invalid UTF-8 middle byte 0x3f
 at [Source: (PushbackInputStream); line: 1, column: 73] (through reference chai
n: com.bj.bjmodularsys.entity.SysRoleEntity["name"])

The key part of the error is: JSON parse error: invalid UTF-8 middle byte 0x3f

Reason: the encoding is inconsistent. The encoding format of Tomcat service transmission should be specified as UTF-8

Solution:

In the bin directory of Tomcat catalina.bat Add the following sentence to the list

set JAVA_ OPTS=%JAVA_ OPTS% – Dfile.encoding=UTF -8

CONDA error notwritableerror: the current user does not have write permissions

Just after installing anaconda and preparing CONDA create environment, we encountered the following error

NotWritableError: The current user does not have write permissions to a required path.
  path: /home/NAME/.conda/envs/.conda_envs_dir_test
  uid: 1000
  gid: 1000

If you feel that permissions on this path are set incorrectly, you can manually
change them by executing

  $ sudo chown 1000:1000 /home/NAME/.conda/envs/.conda_envs_dir_test

In general, it's not advisable to use 'sudo conda'.

According to the prompt he gave, the operation failed, so use the following command to change the permissions of CONDA related folder, – R recursively applied to subfolders

sudo chmod 777 -R ~/anaconda3/
sudo chmod 777 -R ~/.conda/

If the problem is solved for the time being, we will not report the above mistakes

Maybe it’s the redundant problem caused by using sudo sh ana… When installing anaconda.

Altium designer 18: activeroute failed to complete any routing

Problem description:

use AD18 in PCB with Active Route automatic wiring has been unable to successfully, before using this function is normal. ActiveRoute failed to complete any routing. The fault.


Cause of the problem:
There is something wrong with the Chinese compatibility system of AD18. If the file name is Chinese, the Active Route cannot be carried out


Solution:
Just change the name of the PCB file to pure English mode. It doesn’t matter if the path of the file name is Chinese


Reporter:

When creating the project, try to use the English file name to prevent the crash caused by Chinese problems (other problems caused by Chinese have not been found). I don’t know whether AD20 has fixed this BUG for testing

Solving attributeerror: module ‘urllib’ has no attribute ‘request’

Using urllib in Python 3 is an error like this:

Traceback (most recent call last):
  File "*.py", line 34, in <module>
    html_page = get(URL, req_header)
  File "*.py", line 18, in get_HTML
    request = urllib.request.Request(url, headers=req_header)
AttributeError: module 'urllib' has no attribute 'request'

An error code

import urllib
request = urllib.request.Request(url, headers=req_header)
html = urllib.request.urlopen(request).read()
print (html)

Error reason:
in the Python AttributeError errors there are two kinds of main reason:
1.
2. File with same name exists in project directory

> port urllib.request <>ode>
>

import urllib
import urllib.request
request = urllib.request.Request(url, headers=req_header)
html = urllib.request.urlopen(request).read()
print (html)

NPM run dev error: cannot find module ‘webpack cli / bin / config yargs‘

1- Open your package.json file

"devDependencies": {
    "webpack": "^5.2.0",
    "webpack-cli": "^4.1.0",
    "webpack-dev-server": "^3.11.0"
}

Webpack-cli: “^4.1.0”, which is version 4.*
2- Uninstall the current webpack-cli directive: NPM uninstall webpack-cli
3.* version directive: NPM install webpack-cli@3 -d

Just run NPM run dev!
 

The pychar / pytorch page file is too small to complete the operation

Possible reasons for
If baidu, most can tell you is because virtual memory is insufficient, let you increase virtual memory. On Windows, PyTorch may have a problem with its num_workers, which needs to be set to 0.
The solution
The lack of virtual memory may not be a setup problem, but it may simply be a lack of disk space. I cleaned up the disk and the problem was solved successfully.

Windows problem loadlibrary failed, GetLastError = 193

LoadLibrary A.dll failed, and GetLastError returns 193, %1 is not a valid Win32 application.
Maybe the b. DLL associated with a. DLL is not updated, such as a new DLL with a new interface (GetVersion) in the application, and the current B.DLL is not updated, resulting in a 193 error. The dynamically loaded library depends on other dynamic libraries, and you just replace the dynamically loaded library in the library, and the dynamic library dependent library is not updated.

There is also a problem with the 0xc000007b startup program: it is likely that the dependent library is in conflict (that is, the dependent library’s version may not be correct)

An import error is reported in the python. The solution to setting. Pylintrc is invalid

/. Pylintrc problem

because of vs code
, unable to import, searched the pylint setting on the Internet and used the Suggestions in many articles
Pylintrc . Pylintrc set init-hook initialization sys.path method. But no matter how you set it up, those errors don’t go away. Out of the spirit of not giving up until solving the problem, I finally found:

Originally I put the source code on the desktop, python with conda configured virtual environment. Then I ignorantly put . Pylintrc in the folder Scripts and pylint.exe.
Put the RC file on the desktop and solve the problem.

init-hook='import sys; sys.path.append("C:/MySoftware/Miniconda3/envs/tf_env/Lib/site-packages/")'

Just to make fun of how detailed the tutorials are and how elaborate the stuff behind init-hook is without making it clear how the working folder is related to the RC file, resulting in the RC file being set up but not being found by Pylint. Misbehaving! In the official website, the order of pylint to find RC files is clearly written, but it is too inconspicuous, so I searched for a long time.
I like the idea of putting it in a working folder so that each code file can personalize the path it is looking for.

Solutions to “an error occurred while processing this directive”

 
Recently, I helped a client make a station with DedecMS, but the error message “an error while processing this directive” was displayed on the foreground. After searching this prompt, I found that many people encounter this problem, not only in Dedecms, but also in other CMS.
This shows that the problem is not CMS, but the template, searched a lot of information, did not find the specific reason. Today careful inspection, finally found the reason.
It turned out to be the fault of comments. I would often end DIV with comments such as < Div id = “left” & gt; , I’ll put the closing tag < div> < ! – # left – & gt; That’s the problem with the pound sign. A lot of CMS USES < ! – # include file = “chenqinghua. HTM” – & gt; The subtemplate is referenced in this way, and “< ! “– #” is the key, and it conflicts with the template engine. Just drop the # sign.
 

Ubuntu can’t open Gnome terminal and display the error message exited status 8

I’ve been playing around with some environments for my virtual machine lately, and since I don’t have much experience, I’m just following the path of the server. However, once the virtual machine is restarted later, something goes wrong. The GNOME terminal cannot be opened. Start gnOMe-Terminal using Xterm.
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 8

The next time I look it up, it’s a coding problem. Just use the command sudo DPkg-reconfigure locales to add the code you want.

You think that’s the end of it?If you didn’t solve it, it should be the same problem I encountered. I accidentally found that when I configured the environment for my virtual machine, I actually configured another statement: export LC_ALL=C. In this way, no matter how I configured my code, I could not open the terminal in any way.

I finally get rid of that, and the locale in the terminal, works!