Tag Archives: problem

[Solved] ERROR: URL ‘s3://‘ is supported but requires these missing dependencies: [‘s3fs‘]. To install dvc wi

0. Preface
dvc error log

1. Main text
1.1 Problems

ERROR: URL 's3://' is supported but requires these missing dependencies: ['s3fs']. To install dvc with those dependencies, run:

	pip install 'dvc[s3]'

See <https://dvc.org/doc/install> for more info.

Enter as prompted

pip install 'dvc[s3]'

It doesn’t work…

1.2 Solutions

conda install -c conda-forge mamba
mamba install -c conda-forge dvc-s3

reference resources

[1] https://blog.csdn.net/scgaliguodong123_/article/details/122781190

department

[How to Solve] Unexpected space before function parentheses Error

Unexpected space before function parentheses error reporting solution

Unexpected space before function parentheses

this error is the configuration in .eslintrc.js file. Add code to the rules in this file:

"space-before-function-paren": 0

Or the attribute space-before-function-paren already exists in the file. Visit the eslint document
to view the parameters and change them according to the document.

[Solved] JAVA Operate Database Error: You have an error in your SQL syntax; Dao layer SQL statement error

JAVA Operate Database Error: You have an error in your SQL syntax; Dao layer SQL statement error

Specific error reports are as follows:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?,?,?,?,?)' at line 1
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2491)
	at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552)
	at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607)
	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480)
	at cn.edu.wut.jwms.dao.TeacherDao.insertTeacher(TeacherDao.java:39)
	at cn.edu.wut.jwms.testDao.testTeacherInsert(testDao.java:14)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

Error reporting location code:

public boolean insertTeacher(Teacher teacher)  {
        boolean b = false;

        try {
            //get the connection
            Connection connection = JDBCUtil.getConn();

            String sql = "INSERT INTO tb_teacher(teacher_num,teacher_pwd,teacher_name,teacher_tel,teacher_col_id) VALUES(?,?,?,?,?)";
            //compile
            PreparedStatement ps = connection.prepareStatement(sql);

            //Assigning values to placeholders
            ps.setString(1,teacher.getTeacherNum());
            ps.setString(2,teacher.getTeacherPwd());
            ps.setString(3,teacher.getTeacherName());
            ps.setString(4,teacher.getTeacherTel());
            ps.setInt(5,teacher.getTeacherColId());

            int i = ps.executeUpdate(sql);//Number of rows affected by the update operation on the data

            b = i>0?true:false;

            //close the connection
            connection.close();

        } catch (Exception e) {
            e.printStackTrace();
        }
        return b;
    }

Process: check the SQL statements for many times and no errors are found. The test data is also checked for many times to confirm that the rules formulated during table creation are met;

Result.

int i = ps.executeUpdate(sql); because in this code, pass in the sql statement again to report an error, modified to
int i = ps.executeUpdate();; after the error is resolved.
Reason: The sql statement has already been passed in when the compile operation is executed, so it does not need to be passed in again when it is executed.

[Solved] vuecli2+axios Error: NotSameOriginAfterDefaultedToSameOriginByCoep

Problem reporting error

Notsameoriginafterdefaultedtosameoriginbycoep
cross domain isolation

Personal environment: vuecli2 + Axios

Solution:
add the following codes in the headers of Axios

        "Cross-Origin-Opener-Policy": "same-origin",
        "Cross-Origin-Embedder-Policy": "require-corp"

And in the devServer of vue.config.js

headers: {"Cross-Origin-Opener-Policy": "cross-origin","Cross-Origin-Embedder-Policy": "require-corp",},

github Error: Logon failed, use ctrl+c to cancel basic credential prompt.

Logon failed, use ctrl+c to cancel basic credential prompt.

Today, when updating something on gitHub, the password is correct, and you can’t log in more than push. According to the prompt, you find that the previous configuration doesn’t work. The updated configuration is as follows:



set it in the individual

Check these

Generate a token and record it

Continue to push. Enter the password of the account when logging in for the first time, and enter the generated token for the second time

successfully push

[Solved] Nacos Cluster startup error: error=‘Cannot allocate memory‘ (errno=12)

Problem discovery

1. Start one of the Nacos clusters

2. Query the number of starts through the number of starts in the cluster command

ps -ef|grep nacos|grep -v grep|wc -l

This is the second startup. One has been started before, so the problem comes. Why is it still one after the second startup

3. Use the tail-f command to read the contents of the file loop, monitor the growth of the file and find out the reason

tail -f 文件路径   #The file path is given after the start command

Normal start

Second startup error

From the Nacos startup log information, we can see that the memory is insufficient

4. Check the memory usage through the free -h command

There is only 70m of available memory left

5. By viewing startup.sh file to view the JVM startup command

– xms2g represents 2G of initially allocated memory
– xmx2g represents the maximum value of JVM memory
– xmn1g represents 1g of Cenozoic memory;

Solution:

1. Increase system memory

2. Modify the startup parameters of the JVM in the startup script and reduce the memory allocated to the JVM

Allocate according to your current usage mode and the memory of your virtual machine

After modification, it is started successfully

[Solved] import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Execute the following command:

    import cv2
  File "/appletree/miniconda3/envs/yyp_pytorch/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Reason: libGL.so.1 is missing.
Solution:
execute the following command after pip install opencv-python

pip install opencv-python-headless

[Solved] error: link.exe‘ failed with exit status 1158

Error Messages:

bug error: command ‘\XXX\VS2015\VC\BIN\x86_amd64\link.exe‘ failed with exit status 1158

 

Solution:

Because some of the previous system configurations are gone, reinstall things such as vs and buildtools, but there are many problems in the installation process, and there are always missing things. Record the contents that are difficult to find here
prompt error when the program is running: error: command ‘\XXX\VS2015\VC\BIN\x86_amd64\link.exe‘ failed with exit status 1158
background display
I read the online solution, that is, vs is missing two files rc.exe and rcdl.dll can’t run, but I can’t find these two files according to the online path
the path of others is:
C:\Program Files(×86)Windows Kits\8.1\bin\×86
I found it in this path
C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64
or
C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86
both can be used
in short, these two files are rc.exe andrcdl.dll must be in the path of C:\Program Files (x86)\Windows Kits, but the location of different system configurations may be different. This is probably related to some things you installed. Look carefully

then copy the two files to
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64

Or C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
you can solve the problem by installing Microsoft Visual Studio 14.0

[Solved] Ubuntu uses gym to save the video error: “unknown encoder ‘libx264′”

In the experiment of using gym environment to train the agent and save the video locally, an error was encountered when using monitor to save the video:

Unknown encoder 'libx264'

Considering that the video saved in gym is saved in ffmpeg, I reinstalled it, but still reported an error. Then yes

check the original codes ofwrappers.Monitor

Here we judge the selection method, so we can choose other encoders to save our video. We just need to install CONDA, uninstall ffmpeg, and then use other options


import pkgutil
import distutils.spawn
import imageio_ffmpeg

print(distutils.spawn.find_executable("avconv"))
print(distutils.spawn.find_executable("ffmpeg"))
print(pkgutil.find_loader("imageio_ffmpeg"))
print(imageio_ffmpeg.get_ffmpeg_exe())

In my case, after I uninstall ffmpeg in CONDA, what gym calls becomes ffmpeg installed in Ubuntu, and then it can run.

ADS1.2 Error: cannot obtain license [How to Solve]

The error is as follows

Modify the license content under the licenses file:
modify it to the following content.

#
# Generated on 2021-dec-1 by licwizard
#
PACKAGE ads armlmd 1.200 E32F0DE5161D COMPONENTS="armasm compiler bats armulate axd adwu fromelf armlink codewarrior armsd"
INCREMENT ads armlmd 1.200 permanent uncounted 612C53EF47C7 HOSTID=ANY ISSUER="Full License by armer, only for educational purpose!" ck=0
FEATURE Win32_CWIDE_Unlimited metrowks 4.2 permanent uncounted D8C287BC5B1B HOSTID=ANY