Author Archives: Robins

Ies HTP to 500.19 – Internal Server

The errors are as follows:
repair method:

    add the permission of everyone to the folder (I can solve it successfully through this method)
    add the necessary IIS function

    generally, these two moves can solve the problem! If there is a good way, welcome to comment

raise ValueError(‘Expected input batch_size ({}) to match target batch_size ({}).‘

raise ValueError(‘Expected input batch_ size ({}) to match target batch_ size ({}).’

Remember to print the size of the picture before forward propagation. I didn’t notice that all the pictures come in RGB three channel data this time. When using the . View function, I remember to look at it first. When I used it, I calculated the size of the picture directly according to a single channel. Generally, this is the phenomenon that the size of the picture does not match

The phenomenon of mating

Solve the problem that M1 Mac can’t debug when using GoLand

The general error information is as follows:

API server listening at: [::]:57824
debugserver-@(#)PROGRAM:LLDB  PROJECT:lldb-1200.0.44
 for x86_64.
error: failed to launch process /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver: (os/kern) invalid argument
Exiting.

I use go 1.16, which supports arm architecture. The reason for this problem is that go debug needs DLV tool, which also needs arm architecture.

The easiest way to solve this problem is to go to the official website to update GoLand. Pay attention to go to the official website to download the latest arm version again. Usually, the update prompted in the IDE can only be regarded as a patch, not a big version update. In this way, the debugging tools of IDE are adapted to arm architecture.

Of course, due to various reasons that cannot be described, some users may not be suitable to go to the official website to update, so you can refer to this link   https://youtrack.jetbrains.com/issue/GO-10235#focus =Comments-27-4632451.0-0

Download the DLV debugging tool of arm architecture, and then configure it in IDE.

Create a new project in pycharm: modulenotfounde rror:No module named ‘distutils.util‘

The error is as follows:

Don’t panic. It’s not a big problem

When installing pycharm in the Ubuntu system and creating a new project, prompt

ModuleNotFoundError: No module named ‘distutils.util’

The reason is that Ubuntu 18.04 does not install PIP by default, so you need to install python3 pip,

Enter the command in the terminal:

sudo apt-get install python3-pip

When you create a new project again, the problem can be solved

When calling time module – time / datetime in wxPython, an error is reported. Valueerror: unknown locale: zh cn

1. Key words: valueerror: unknown locale: zh cn

A lot of instructions on the Internet are about the language environment. Set up a round down, or not.

2. Key words: wxPython valueerror: unknown locale: zh cn

We found the following link through the wall:

https://github.com/pyinstaller/pyinstaller/issues/4874

The corresponding relationship of the version number mentioned below

 
  PyInstaller==3.4 wxPython==4.0.4 good

  PyInstaller==3.6 wxPython==4.0.4 good

  PyInstaller==3.6 wxPython==4.0.7 good

  PyInstaller==3.6 wxPython==4.0.7.post2 good

  PyInstaller==3.6 wxPython==4.1.0 bad

 
3. Upgrade or reduce the version number of wxpathon. Then upgrade the version.

pip3 install upgrade wxPython

NettyAvroRpcClient RPC connection error

2014-12-19 01:05:42,141 (lifecycleSupervisor-1-1) [WARN – org.apache.flume.sink.AbstractRpcSink.start(AbstractRpcSink. java:294 )] Unable to create Rpc client using hostname: xxx.xxx.xxx.xxx, port: 41100
org.apache.flume.FlumeException: NettyAvroRpcClient { host: 121.41.49.51, port: 41100 }: RPC connection error

This problem occurs when flume uses Avro to accept data.

First, let’s see if the port of the connected server is monitored

If you want to send data to port 4383 of 192.168.1.1, you need a server listening to this window, otherwise RPC connection failure will occur

ERROR: Invalid HADOOP_COMMON_HOME

Error when starting Hadoop and yarn
/start yarn. Sh
error: invalid Hadoop_ COMMON_ HOME

Solution:
1. Check Java first_ Is home configured correctly

java
javac

2. Then check whether Hadoop home is configured correctly

hadoop version
Hadoop 3.1.3
Source code repository https://gitbox.apache.org/repos/asf/hadoop.git -r ba631c436b806728f8ec2f54ab1e289526c90579
Compiled by ztang on 2019-09-12T02:47Z
Compiled with protoc 2.5.0
From source with checksum ec785077c385118ac91aadde5ec9799
This command was run using /opt/module/hadoop-3.1.3/share/hadoop/common/hadoop-common-3.1.3.jar

When generating a test report in HTML format, report [typeerror: a bytes like object is required, not ‘STR’]

1、 Error information

E:\pythonProject\study\venv\Scripts\python.exe E:/pythonProject/case/test_ login.py
…Traceback (most recent call last):
  File “E:\pythonProject\case\test_ login.py”, line 71, in < module>
    runner.run(suit)  # Call the run() method under the htmltestrunner class to run the use case suite
class   File “E:\pythonProject\study\venv\lib\site-packages\HTMLTestRunner\HTMLTestRunner.py”, line 631, in run
    self.generateReport(test, result)
  File “E:\pythonProject\study\venv\lib\site-packages\HTMLTestRunner\HTMLTestRunner.py”, line 691, in generateReport
    self.stream.write(output)
TypeError: a bytes-like object is required, not ‘str’

2、 Source code

#Path and name of test report

dir = “E:/pythonProject/login_ report.html”

#”WB” creates or opens a binary file and writes the finished data

filename = open(dir, “wb”)

#Call htmltestrunner class to define test report content

runner = HTMLTestRunner.HTMLTestRunner(stream=filename, title=”Testcase Report”, description=”testcases”)

runner.run(suit)     #  Call the run () method under the htmltestrunner class to run the use case suite

filename.close()    #  Close test report file

3、 Solutions

#Path and name of test report

dir = “E:/pythonProject/login_ report.html”

#”W” creates or opens a new file and writes the finished data

filename = open(dir, “w”)

#Call htmltestrunner class to define test report content

runner = HTMLTestRunner.HTMLTestRunner(stream=filename, title=”Testcase Report”, description=”testcases”)

runner.run(suit)     #  Call the run () method under the htmltestrunner class to run the use case suite

filename.close()    #  Close test report file