Tag Archives: ProgrammerAH

[Solved] unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.36.540471

I wrote a crawler in python, it works fine in pycharm, but it reports an error on the command line under linux
Message: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.36.540471 (9c759b81a907e70363c6312294d30b6ccccc2752),platform=Linux 4.14.0-deepin2-amd64 x86_64)
You are using arg –headless so with that my be you can try with another argument –no-sandbox and window-size=1024,768.

chrome.additional.capabilities={“chromeOptions”:{“args”:[“–headless”, “window-size=1024,768”, “–no-sandbox”], “binary”: “/home/ubuntu/software/chromedriver”}}

Solution:

chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument("window-size=1024,768")
chrome_options.add_argument("--no-sandbox")
driver = webdriver.Chrome(chrome_options=chrome_options)

[Solved] /var/tmp/rpm-tmp. The tmp file cannot be found when the installation fails

When installing the package generated by rpmbuild, the following error occurred:

/var/tmp/rpm-tmp.YiDXeN: line 374: syntax error: unexpected end of file

 

Solution:

Write a shell script:

#!/ bin/bash

while [ 1 -eq 1 ]
do
cat -n /var/tmp/rpm-tmp.*
done

Then execute./Sh_ test.sh

Another window starts the installation, and you can see in the front window where the error stopped.

If/var/TMP/rpm-tmp.6ljgwm: Line 374: syntax error: unexpected end of file

Generally, if and fi are not paired. You can use Notepad + + statistics to see if   Don’t count elif

Or use Notepad to open the spec script, highlight if and see the pairing.

have not closed a control structure such as a missing  fi   with an  if, or a missing  done   with a  for.

A problem occurred configuring project ‘:x x x‘. > java.lang.NullPointerException (no error message)

This error is reported after upgrading androidsudio4.2.2, my Mac is OK, and my colleagues report this error
after my colleagues demote androidsudio4.1.3, it may be because the imported project is old, and the gradle version is too old and does not match the new version. Other posts say that it is the problem of NDK path, and the gradle version does not match NDK, which may be quite big

ModuleNotFoundError: No module named ‘apt_pkg‘

reason

Upgrading to python3.6 will result in confusion of references to Python libraries

resolvent

Select Delete Python apt first

apt-get remove --purge python-apt 

Install Python apt

apt-get install -f -y python-apt

Copy the apt PKG *. So name of python3.5 and rename it apt PKG *. So of python3.6

cd /usr/lib/python3/dist-packages/
cp apt_pkg.cpython-35m-x86_64-linux-gnu.so apt_pkg.cpython-36m-x86_64-linux-gnu.so

Error: Flash download failed – “cortex-m4″“

Picture address: https://www.keil.com/dd2/pack/# # eula-container

Jflash download address: https://www.segger.com/products/production/flasher/tools/j-flash-spi/

Solution to bug:

1. Click the magic wand

2. Click settings in debug

3. Click flash download to add stmf4xxflash

Flash download has been explained at the beginning. After downloading the firmware library, find the flash folder in your keil5 folder and put the corresponding flash file in it

Put the file below in the folder corresponding to the picture above

[Solved] hello.s:15 Error: junk at end of line, first unrecognized character valued 0x8

gccThe compiler reports the following error.
hello.s: warning: end of file, not end of line; insert new line
hello.s:1: Error: junk at end of line, first unrecognized character valued 0x7f
hello.s:1: Error: junk at end of line, first unrecognized character valued 0x3
hello.s:1: Error: junk at end of line, first unrecognized character is >' hello.s:1: Error: junk at end of line, first unrecognized character valued 0x1 hello.s:1: Error: junk at end of line, first unrecognized character is0′
hello.s:1: Error: junk at end of line, first unrecognized character is @' hello.s:1: Error: junk at end of line, first unrecognized character is(‘
hello.s:1: Error: junk at end of line, first unrecognized character is @' hello.s:1: Error: junk at end of line, first unrecognized character is8′
hello.s:1: Error: junk at end of line, first unrecognized character is @' hello.s:1: Error: junk at end of line, first unrecognized character valued 0x1b hello.s:1: Error: junk at end of line, first unrecognized character valued 0x1a hello.s:1: Error: junk at end of line, first unrecognized character valued 0x1a hello.s:1: Error. junk at end of line, first unrecognized character valued 0x6 hello.s:1: Error: junk at end of line, first unrecognized character valued 0x4 hello.s:1: Error: junk at end of line, first unrecognized character is@’
There is no correct solution on the Internet, so I studied it carefully. gcc compiler is fine, the problem is that the gcc code is typed in the wrong case!
The correct command is as follows

gcc -E hello.c -o hello.i -v
gcc -S hello.i -o hello.s -v
gcc -c hello.s -o hello.o -v

When generating the. S file, the s of GCC – s should be capitalized
otherwise, an error will occur when GCC – C generates the. O file!!

[Solved] Win10 Install wsl2 unbuntu Error: WslRegisterDistribution failed with error: 0x80070002

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070002
Error: 0x80070002 The system cannot find the file specified.

Press any key to continue...

Solution: don’t use wsl2 by default, use wsl1 by default (input WSL — set default version 1 after PowerShell opens)

Then install Ubuntu again.

Ubuntu20.04 install the ROS noetic version in catkin_Problems in make compilation

2021-06-27 install ROS noetic version. There was a problem during compilation. Now record it

1. Error one

-- Could NOT find PY_em (missing: PY_EM) 
CMake Error at cmake/empy.cmake:30 (message):
Unable to find either executable 'empy' or Python module 'em'...  try
installing the package 'python-empy'

You need to install Python empy to solve the above problems

pip install empy

2. Error two

Once the error is resolved, continue with catkin_ The following error occurred when making

ImportError: "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg'
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH

Try to find catkin_ PKG and check pythonpath with the following command:

locate catkin_pkg

If you execute the above command and report an error that locate is not installed, use the following command to install it:

sudo apt install mlocate

After executing locate catkin_ After PKG, in the displayed results, the first behavior is as follows:

/usr/lib/python3/dist-packages/catkin_pkg

View the path of pythonpath

echo $PYTHONPATH
# After executing the above command, the following result is displayed
/opt/ros/noetic/lib/python3/dist-packages

Therefore, catkin_ Make is not in the pythonpath path. Next, you need to add catkin_ Make is added to the pythonpath path

Edit the ~/.bashrc file and add the following two lines to the end of the file.
export PYTHONPATH=$PYTHONPATH:/usr/lib/python3/dist-packages

Save the file and run the source to update.
source ~/.bashrc

Re-check PYTHONPATH:
echo $PYTHONPATH
/opt/ros/noetic/lib/python3/dist-packages:/usr/lib/python3/dist-packages

To solve the above two problems

[Solved] org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.exception

org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:80)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:91)
at org.hibernate.loader.Loader.getResultSet(Loader.java:2066)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1863)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839)
at org.hibernate.loader.Loader.doQuery(Loader.java:910)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355)
at org.hibernate.loader.Loader.doList(Loader.java:2554)
at org.hibernate.loader.Loader.doList(Loader.java:2540)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370)
at org.hibernate.loader.Loader.list(Loader.java:2365)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:497)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:236)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1300)
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103)
at com.icss.framework.service.BaseService.queryByHql(BaseService.java:746)
at com.icss.aqxxzy.service.SearchService.search147Info(SearchService.java:359)
at com.icss.aqxxzy.controller.SearchController.search147(SearchController.java:149)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.icss.resourceone.sdk.SdkFilter.doFilter(SdkFilter.java:166)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: Table or view does not exist

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1296)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3657)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:82)
... 58 more

Error details: the result set cannot be initialized because the table or view does not exist

Solution process:

1. The Java entity class does not correspond to the data type of the database field, no problem

2. If the table name is different from that in the database, add the table name again

3. The value of name corresponding to column does not correspond to the case of database field

4. The configuration file is not connected to the database correctly

The above common error causes have been ruled out, there is no problem

The cause of the error is: the database to which the table is built is different from the database to which the configuration file is connected, and the address of the database to which the table is built is not checked carefully

Reproduced in: https://www.cnblogs.com/baijingting/p/9711813.html

[Solved] Springboot2.x ElasticSearch Error: availableProcessors is already set to [4], rejecting [4]

Error message:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticsearchClient' defined in class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.transport.TransportClient]: Factory method 'elasticsearchClient' threw exception; nested exception is java.lang.IllegalStateException: availableProcessors is already set to [4], rejecting [4]

The solution to this problem encountered by the springboot startup class:

@SpringBootApplication
public class Application{
    public static void main(String[] args) {
        System.setProperty("es.set.netty.runtime.available.processors","false");
        SpringApplication.run(Application.class, args);
    }
}

The solution to this problem in unit testing:

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
public class ESTest {

    @Autowired
    private ElasticsearchTemplate elasticsearchTemplate;

    public ESTest(){
        // Add this line of code to the test class constructor
        System.setProperty("es.set.netty.runtime.available.processors","false");
    }

    @Test
    public void testCreateIndex() {
        elasticsearchTemplate.createIndex(Users.class);
    }
}

[Solved] Error in executing mysqld — initialize command

D:\develop\mysql-5.7.27-winx64\bin>mysqld –initialize
mysqld: Can’t create directory ‘D:\mysql-5.7.27-winx64\data’ (Errcode: 2 – No such file or directory)
2021-06-27T11:23:41.634820Z 0 [ERROR] Can’t find error-message file ‘D:\mysql-5.7.27-winx64\share\errmsg.sys’. Check error-message file location and ‘lc-messages-dir’ configuration directive.
2021-06-27T11:23:41.638039Z 0 [ERROR] Aborting

Solution:
Just modify the path in the my.ini configuration file

How to Solve Maven Error: Failure to transfer com.thoughtworks.xstream:xstream:jar:1.3.1 from https://repo.maven.ap

Report error in full: Failure to transfer com.thoughtworks.xstream:xstream:jar:1.3.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval
of central has elapsed or updates are forced. Original error: Could not transfer artifact com.thoughtworks.xstream:xstream:jar:1.3.1 from/to central (https://repo.maven.apache.org/maven2): The operation
was cancelled.
Should be the time to download the package error, go to the repository to delete, re-download it!
After the deletion, maven clean, done!
Similar question.
Failure to transfer org.apache.maven.shared:maven-filtering:jar:1.0-beta-2 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the
update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.shared:maven-filtering:jar:1.0-beta-2 from/to central (https://
repo.maven.apache.org/maven2): The operation was cancelled.

The same method to solve, are half of the download interrupted, the reason for the package is not complete.