Numpy.exp Function Error ‘Float’ object has no attribute ‘exp’

Problem Description:

When python is using a custom sigmoid function, input X as a matrix, there will be a situation where’Float’ object has no attribute’exp’.

def sigmoid(inp):
return 1.0/(1 + np.exp(-inp))

It is found that it is no problem to manually generate the matrix data into this function, and then find it by looking up the numpy.mat function

numpy.mat(data, dtype=None)[source]

Interpret the input as a matrix.

Unlike matrix, asmatrix does not make a copy if the input is already a matrix or an ndarray. Equivalent to matrix(data, copy=False).

Parameters:
data: array_like

Input data.

dtype: data-type

Data-type of the output matrix.

Returns:
mat: matrix

data interpreted as a matrix.

The default dtype is None, so when the matrix is ​​generated, the dtype is added to the type to solve the problem. For example, Xmat = numpy.mat(_x, dtype=float), and then Xmat was brought into the sigmoid function, no problem was found.


AttributeError: 'Float' object has no attribute 'exp'

Tensorflow Error TypeError: Fetch argument XXXX has invalid typeXXXX,must be a string or Tensor

When training a small model today, this error occurred:


TypeError: Fetch argument 2.19779 has invalid type <class 'numpy.float32'>, 
must be a string or Tensor. (Can not convert a float32 into a Tensor or Operation.)

In the output, you can see that there is a line of correct output, that is, the Loss calculation is performed once, and then this error is thrown during the second calculation. In the error message, 2.19779 happens to be the result of the first Loss calculation.

Found the same problem in stackoverflow (see TypeError: Fetch argument has invalid type float32, must be a string or Tensor
).
In fact, the reason for the error is very simple. My previous execution statement was like this:


_, loss = sess.run([optimizer, loss], feed_dict={X:input_batch, Y:target_batch})

The problem is that loss is redefined ! ! , Which is in this form:


loss = sess.run(loss)

In this way, the first run is no problem. If the result of the first calculation of loss is 10, then the loss is redefined, that is, the previous loss is the node for calculating the loss value. After the first run, it becomes A common variable is also assigned a value of 10, so the second operation becomes:


loss = sess.run(10)

The above type error occurred.
Therefore, the question of naming must not be sloppy, remember to remember.

PIP Install Mysqlclient error C1083: Cannot open include file: ‘mysql.h‘: No such file or directory

Problem Description:
System: win10 (64 bit)

python version: 3.7.8

MySQL Server 8.0

MySQL Connector C 6.1

When using the pip install -r requirements.txt command, an error is reported when installing to mysqlclient (mysqlclient has been installed through the pip command):

ERROR: Command errored out with exit status 1:
command: ‘c:\python3.7.8\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-k4s1hfze\\mysqlclient\\setup.py'”‘”‘; __file__='”‘”‘C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-k4s1hfze\\mysqlclient\\setup.py'”‘”‘;f=getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(__file__);code=f.read().replace(‘”‘”‘\r\n'”‘”‘, ‘”‘”‘\n'”‘”‘);f.close();exec(compile(code, __file__, ‘”‘”‘exec'”‘”‘))’ install –record ‘C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-8r_vb76d\install-record.txt’ –single-version-externally-managed –compile –install-headers ‘c:\python3.7.8\Include\mysqlclient’
cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-k4s1hfze\mysqlclient\
Complete output (30 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying _mysql_exceptions.py -> build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\compat.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.7\MySQLdb
creating build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-3.7\MySQLdb\constants
running build_ext
building ‘_mysql’ extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,3,12,’final’,0) -D__version__=1.3.12 “-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include” -Ic:\python3.7.8\include -Ic:\python3.7.8\include “-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt” “-IC:\Program Files (x86)\Windows Kits\8.1\include\shared” “-IC:\Program Files (x86)\Windows Kits\8.1\include\um” “-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt”/Tc_mysql.c /Fobuild\temp.win-amd64-3.7\Release\_mysql.obj / Zl
_mysql.c
_mysql.c(29): fatal error C1083: Cannot open include file: ‘mysql.h’: No such file or directory
error: command ‘C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe’ failed with exit status 2
—————————————-
Rolling back uninstall of mysqlclient
Moving to c:\python3.7.8\lib\site-packages\mysqlclient-1.4.6.dist-info\
from c:\python3.7.8\lib\site-packages\~ysqlclient-1.4.6.dist-info
Moving to c:\python3.7.8\lib\site-packages\mysqldb\
from c:\python3.7.8\lib\site-packages\~ysqldb
ERROR: Command errored out with exit status 1: ‘c:\python3.7.8\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-k4s1hfze\\mysqlclient\\setup.py'”‘”‘; __file__='”‘”‘C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-k4s1hfze\\mysqlclient\\setup.py'”‘”‘;f=getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(__file__);code=f.read().replace(‘”‘”‘\r\n'”‘”‘, ‘”‘”‘\n'”‘”‘);f.close();exec(compile(code, __file__, ‘”‘”‘exec'”‘”‘))’ install –record ‘C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-8r_vb76d\install-record.txt’ –single-version-externally-managed –compile –install-headers ‘c:\python3.7.8\Include\mysqlclient’ Check the logs for full command output.

Reason analysis:
For 64-bit Windows, when pip installs mysqlclient, it only searches for certain MySQL files (such as “mysql.h”) in the Program files (x86) folder, but does not search for Program files. This machine installs the MySQL connector Go to C:\Program Files\MySQL, but there is no MySQL installation directory in C:\Program Files (x86), so no content is found in Program files (x86), resulting in an error.

Solution:
Copy the C:\Program Files\MySQL\MySQL Connector C 6.1 folder to the C:\Program Files (x86)\MySQL\MySQL Connector C 6.1 directory (I used a very simple and rude method to copy the entire MySQL folder ), re-execute the command pip install -r requirements.txt. The command was executed successfully

 


E:\HttpRunnerManager>pip install -r requirements.txt
Requirement already satisfied: Django==2.0.3 in c:\python3.7.8\lib\site-packages (from -r requirements.txt (line 1)) (2.0.3)
Requirement already satisfied: PyYAML==3.12 in c:\python3.7.8\lib\site-packages (from -r requirements.txt (line 2)) (3.12)
Requirement already satisfied: requests==2.18.4 in c:\python3.7.8\lib\site-packages (from -r requirements.txt (line 3)) (2.18.4)
Requirement already satisfied: eventlet==0.22.1 in c:\python3.7.8\lib\site-packages (from -r requirements.txt (line 4)) (0.22.1)
Collecting mysqlclient==1.3.12
  Using cached mysqlclient-1.3.12.tar.gz (89 kB)
Collecting django-celery==3.2.2
  Using cached django-celery-3.2.2.tar.gz (90 kB)
Collecting flower==0.9.2
  Using cached flower-0.9.2.tar.gz (1.3 MB)
Collecting dwebsocket==0.4.2
  Using cached dwebsocket-0.4.2.tar.gz (14 kB)
Collecting paramiko==2.4.1
  Using cached paramiko-2.4.1-py2.py3-none-any.whl (194 kB)
Collecting HttpRunner==1.5.8
  Using cached HttpRunner-1.5.8-py2.py3-none-any.whl (48 kB)
Requirement already satisfied: pytz in c:\python3.7.8\lib\site-packages (from Django==2.0.3->-r requirements.txt (line 1)) (2020.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\python3.7.8\lib\site-packages (from requests==2.18.4->-r requirements.txt (line 3)) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\python3.7.8\lib\site-packages (from requests==2.18.4->-r requirements.txt (line 3)) (2020.6.20)
Requirement already satisfied: idna<2.7,>=2.5 in c:\python3.7.8\lib\site-packages (from requests==2.18.4->-r requirements.txt (line 3)) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\python3.7.8\lib\site-packages (from requests==2.18.4->-r requirements.txt (line 3)) (1.22)
Requirement already satisfied: greenlet>=0.3 in c:\python3.7.8\lib\site-packages (from eventlet==0.22.1->-r requirements.txt (line 4)) (0.4.16)
Requirement already satisfied: celery<4.0,>=3.1.15 in c:\users\administrator\appdata\roaming\python\python37\site-packages (from django-celery==3.2.2->-r requirements.txt (line 6)) (3.1.26.post2)
Collecting tornado>=4.2.0
  Using cached tornado-6.0.4-cp37-cp37m-win_amd64.whl (417 kB)
Collecting babel>=1.0
  Using cached Babel-2.8.0-py2.py3-none-any.whl (8.6 MB)
Requirement already satisfied: setuptools in c:\python3.7.8\lib\site-packages (from dwebsocket==0.4.2->-r requirements.txt (line 8)) (47.1.0)
Requirement already satisfied: six in c:\python3.7.8\lib\site-packages (from dwebsocket==0.4.2->-r requirements.txt (line 8)) (1.15.0)
Collecting cryptography>=1.5
  Using cached cryptography-3.1-cp37-cp37m-win_amd64.whl (1.5 MB)
Collecting pynacl>=1.0.1
  Using cached PyNaCl-1.4.0-cp37-cp37m-win_amd64.whl (206 kB)
Collecting pyasn1>=0.1.7
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting bcrypt>=3.1.3
  Using cached bcrypt-3.2.0-cp36-abi3-win_amd64.whl (28 kB)
Requirement already satisfied: har2case in c:\python3.7.8\lib\site-packages (from HttpRunner==1.5.8->-r requirements.txt (line 10)) (0.3.1)
Collecting requests-toolbelt
  Using cached requests_toolbelt-0.9.1-py2.py3-none-any.whl (54 kB)
Requirement already satisfied: Jinja2 in c:\python3.7.8\lib\site-packages (from HttpRunner==1.5.8->-r requirements.txt (line 10)) (2.11.2)
Requirement already satisfied: colorama in c:\python3.7.8\lib\site-packages (from HttpRunner==1.5.8->-r requirements.txt (line 10)) (0.4.3)
Collecting colorlog
  Using cached colorlog-4.2.1-py2.py3-none-any.whl (14 kB)
Requirement already satisfied: billiard<3.4,>=3.3.0.23 in c:\users\administrator\appdata\roaming\python\python37\site-packages (from celery<4.0,>=3.1.15->django-celery==3.2.2->-r requirements.txt (line 6)) (3.3.0.23)
Requirement already satisfied: kombu<3.1,>=3.0.37 in c:\users\administrator\appdata\roaming\python\python37\site-packages (from celery<4.0,>=3.1.15->django-celery==3.2.2->-r requirements.txt (line 6)) (3.0.37)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in c:\python3.7.8\lib\site-packages (from cryptography>=1.5->paramiko==2.4.1->-r requirements.txt (line 9)) (1.14.2)
Requirement already satisfied: MarkupSafe>=0.23 in c:\python3.7.8\lib\site-packages (from Jinja2->HttpRunner==1.5.8->-r requirements.txt (line 10)) (1.1.1)
Requirement already satisfied: anyjson>=0.3.3 in c:\users\administrator\appdata\roaming\python\python37\site-packages (from kombu<3.1,>=3.0.37->celery<4.0,>=3.1.15->django-celery==3.2.2->-r requirements.txt (line 6)) (0.3.3)
Requirement already satisfied: amqp<2.0,>=1.4.9 in c:\users\administrator\appdata\roaming\python\python37\site-packages (from kombu<3.1,>=3.0.37->celery<4.0,>=3.1.15->django-celery==3.2.2->-r requirements.txt (line 6)) (1.4.9)
Requirement already satisfied: pycparser in c:\python3.7.8\lib\site-packages (from cffi!=1.11.3,>=1.8->cryptography>=1.5->paramiko==2.4.1->-r requirements.txt (line 9)) (2.20)
Using legacy 'setup.py install' for mysqlclient, since package 'wheel' is not installed.
Using legacy 'setup.py install' for django-celery, since package 'wheel' is not installed.
Using legacy 'setup.py install' for flower, since package 'wheel' is not installed.
Using legacy 'setup.py install' for dwebsocket, since package 'wheel' is not installed.
Installing collected packages: mysqlclient, django-celery, tornado, babel, flower, dwebsocket, cryptography, pynacl, pyasn1, bcrypt, paramiko, requests-toolbelt, colorlog, HttpRunner
  Attempting uninstall: mysqlclient
    Found existing installation: mysqlclient 1.4.6
    Uninstalling mysqlclient-1.4.6:
      Successfully uninstalled mysqlclient-1.4.6
    Running setup.py install for mysqlclient ... done
  Attempting uninstall: django-celery
    Found existing installation: django-celery 3.3.1
    Uninstalling django-celery-3.3.1:
      Successfully uninstalled django-celery-3.3.1
    Running setup.py install for django-celery ... done
    Running setup.py install for flower ... done
    Running setup.py install for dwebsocket ... done
  Attempting uninstall: HttpRunner
    Found existing installation: httprunner 3.1.4
    Uninstalling httprunner-3.1.4:
      Successfully uninstalled httprunner-3.1.4
Successfully installed HttpRunner-1.5.8 babel-2.8.0 bcrypt-3.2.0 colorlog-4.2.1 cryptography-3.1 django-celery-3.2.2 dwebsocket-0.4.2 flower-0.9.2 mysqlclient-1.3.12 paramiko-2.4.1 pyasn1-0.4.8 pynacl-1.4.0 requests-toolbelt-0.9.1 tornado-6.0.4
 
E:\HttpRunnerManager>

 

other reasons:
Reason 1:

1. Mysqlclient version does not match, Mysqlclient download address https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient

2. Mysqlclient installation command

pip install mysqlclient-1.4.6-cp37-cp37m-win_amd64.whl

3. To verify whether the installation is successful, use the command:

python

>>> import MySQLdb

No error means success

C:\Users\Administrator>python
Python 3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>>

Reason two:

MySQL Connector-c is not installed, the download address is https://downloads.mysql.com/archives/cc/ , just download and install.

Reason three:

Use the pip install mysql-connector command to install mysql-connector

C:\Users\Administrator>pip install mysql-connector
Collecting mysql-connector
  Downloading mysql-connector-2.2.9.tar.gz (11.9 MB)
     |████████████████████████████████| 11.9 MB 467 kB/s
Using legacy 'setup.py install' for mysql-connector, since package 'wheel' is not installed.
Installing collected packages: mysql-connector
    Running setup.py install for mysql-connector ... done
Successfully installed mysql-connector-2.2.9

Eclipse Graphical Layout Error: Failed to find the style corresponding to the id 2130772027

After downloading the Android SDK, I ran the Android SDK Manageer.exe update for a whole day, and then installed ADT in Eclipse. After almost finishing it, I started to write the first Android program: HelloWrold. After creating this project step by step, follow the textbook As mentioned, when you click on the activity_main.xml file, there should be an interface where you can drag the controls directly, but there is nothing in my interface, and then the following message appears:

Failed to find the style corresponding to the id 2130772026
Failed to find the style corresponding to the id 2130771996
java.lang.NullPointerException
Exception details are logged in Window> Show View> Error Log
The following classes could not be instantiated:
-android.support.v7.internal.app.WindowDecorActionBar (Open Class, Show Error Log)
See the Error Log (Window> Show View) for more details.

How to Solve this error:

The SDK version is too high, lower the API level, and restart Eclipse

 

How to Solve Error Swift 4 Expression type ‘@value CGRect’ is ambiguous without more context

Swift 4 Expression type’@value CGRect’ is ambiguous without more context

For example, there is now a class:


class ImageListView: UIView {
    var moment: Moment!
    var tapSmallView: ((_ iamgeView: UIImageView) -> Void)?
    var imagesArray: [UIImageView]!
    //ImagePreviewView is another custom class, which has a scrollView
    var imagesPreview: ImagePreviwView!
    
    
    func setMoment(_ moment: Moment) {
        self.moment = moment
        let count = moment.ImageCount
        imagesPreview.scrollView.contentSize = CGSize(width: imagesPreview.frame.width*count, height: imagesPreview.frame.height)
    }
}

In this case, setting the contentSize of the scrollView will report an error, because count is of type Int. If we do any mathematical operations on screenBounds, please make sure to check the type matches.

You must change the type:

imagesPreview.scrollView.contentSize = CGSize(width: imagesPreview.frame.width*CGFloat(count), height: imagesPreview.frame.height)

[Solved] Exception while doing past iteration backup

This is the error message I encountered


Error:Execution failed for task ':app:buildInfoDebugLoader'.
> Exception while doing past iteration backup : Source F:\workspace\ApplicationTest\app\build\intermediates\builds\debug\31511899501846\classes.dex and destination F:\workspace\ApplicationTest\app\build\intermediates\builds\debug\31511899501846\classes.dex must be different

This is because there is a file named classes.dex conflict under the build, you can find the specified file and delete it and run it again.
For my exception information, find the file as shown in the figure below, and right-click to delete it.

How to Solve Error inflating class android.support.design.widget.FloatingActionButton

Problem Description

Floating box style is abnormal


 Caused by: android.view.InflateException: Binary XML file line #10 in com.example.administrator.myapplication:layout/activity_event_simple: Binary XML file line #10 in com.example.administrator.myapplication:layout/activity_event_simple: Error inflating class android.support.design.widget.FloatingActionButton
     Caused by: android.view.InflateException: Binary XML file line #10 in com.example.administrator.myapplication:layout/activity_event_simple: Error inflating class android.support.design.widget.FloatingActionButton
     Caused by: java.lang.ClassNotFoundException: android.support.design.widget.FloatingActionButton
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:454)
        at android.view.LayoutInflater.createView(LayoutInflater.java:813)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1004)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1121)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
        at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
        at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
        at com.example.administrator.myapplication.event.EventSimpleActivity.onCreate(EventSimpleActivity.java:16)
        at android.app.Activity.performCreate(Activity.java:8000)
        at android.app.Activity.performCreate(Activity.java:7984)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.FloatingActionButton" on path: DexPathList[[zip file "/data/app/~~ifhZZYKrV3-7IC9EpRYwtQ==/com.example.administrator.myapplication-dVeo5FiMTqcAMDRaRAmCew==/base.apk"],nativeLibraryDirectories=[/data/app/~~ifhZZYKrV3-7IC9EpRYwtQ==/com.example.administrator.myapplication-dVeo5FiMTqcAMDRaRAmCew==/lib/x86, /system/lib, /system_ext/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        	... 28 more

Solutions
Check whether to add the corresponding dependency

Specific code
Add
implementation’com.android.support: design:28.0.0 ‘ in build.gradle


dependencies {
    implementation 'com.android.support:design:28.0.0'
}

How to Solve Error: could not read ok from ADB Server.failed to start daemon error: cannot connect to daemon

Problem Description:
Execute the command adb connect 127.0.0.1:62001, the error is reported as follows:

* daemon not running; starting now at tcp:5037
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon

Reason analysis:
Use the command to check whether the port is occupied or not netstat -ano | findstr “5037”

Check that port 5037 is occupied

Solution:
Execute the command kill process to release port 5037:

taskkill -f -pid 15276

Re-execute the adb connect 127.0.0.1:62001 command, the connection is successful

Two solutions to Cannot load module file xxx.iml

I recently got the code of a Pycharm project from my classmate, and then opened it on my computer and reported an error: Cannot load module file xxx.iml: File xxx.iml doed not exist. Would you like to remove module’xxxx’ from the project? At this time, the directory structure of the entire project is incomplete, and some files cannot be displayed. The reason for the correction may be that the project name was changed by the classmate when he gave me the project, or the project he gave me was not at the same level as the project directory he used (for example, what he copied to me was under a large project code Subprojects), causing problems.

There are two final solutions:

One way is to click File in the upper left corner of the Pycharm software, then click Invalidate Caches / Restart…, and then click Invalidate and Restart after the pop-up dialog box to wait for the project to reload, the problem is solved.

Another method is to delete the .idea folder in the project directory when the project is closed, and then reopen the problem with Pycharm to solve the problem. In addition, some friends may use Pycharm under the Linux platform. The .idea folder is hidden and cannot be seen directly. Then you can use the la command to view the files under the project, and then execute the command rm -r .idea.

QT Creator Error while building deploying project

Error while building deploying project
is reported by QT creator

When QT creator compiles QT project, an error is reported: error while building deploying project.

The following tips may also appear

qt creator needs a tool chain set up to build. configure a tool chain in projects mode

 

This situation occurs when I open the past project, but the new project does not have this error.

The solution is as follows:

1. When the error reporting project is open, click the projects column on the left side of QT creator

Reload the XXX build desktop QT of the project in the build directory of the general column_ xxx_ Qt_ xxx_ Debug。 (by default, this part is gray and not enabled. Click Import exiting build below to enable it.)

 

After this operation, you can compile normally!