Tag Archives: ProgrammerAH

Encountered a problem — Python — Python 3 uses Sqlalchemy to report an error‘

situation   follow the instructions in the flash Sqlalchemy document to configure the  
SQLALCHEMY_ DATABASE_ URI = ‘ mysql://username:password@server/db ‘  
1  
after operation, MySQL reports an error importerror: no module named ‘MySQL db’.  
why  
since there is no MySQL DB module, follow the normal idea  
pip install MySQLdb  
1  
it should be able to solve this problem, but no corresponding module can be found. After checking, this is because mysql-3.23 through 5.5 and python-2.4 through 2.7 are currently supported.  
solutions  
looking for alternatives  
in Python 3, we generally use pymysql.  
implementation  
pip install PyMySQL
1  
change the database connection to  
mysql+ pymysql://username:password@server/db
1  
the next operation is normal original link: https://blog.csdn.net/zzq900503/article/details/89096311

Applet error – referenceerror: regeneratorruntime is not defined

When using the wechat developer tool to import the small program to run,
there is such a bug
small program error – referenceerror: regeneratorruntime is not defined

According to the prompts given by the editor, locate the place where the error is reported
the applet reports an error when using async to request data. Referenceerror: regeneratorruntime is not defined
find the problem and solve it

terms of settlement:

Click the details button in the upper right corner
and select local settings
to remove the check of ES6 to Es5

Refresh again
and the error will no longer appear

vue Failed at the [email protected] install script

Today, NPM can’t be installed. After reading most of the answers on the Internet, there are problems with the installed image URL. Finally, the correct website is:

npm install chromedriver --chromedriver_cdnurl=https://npm.taobao.org/mirrors/chromedriver

Then execute the install NPM command

Attached official website: https://www.npmjs.com/package/chromedriver

sqlite3.OperationalError: no such column:

If you want to insert Python values into a SQL database, just naming the Python variables in the SQL statement is not enough. The SQL database instead thinks you wanted to insert values taken from the table or another query instead.
Use SQL parameters instead, and pass in the actual values:

params = (userName, password, confirmPassword, firstName, lastName,
          companyName, email, phoneNumber, addressLine1, addressLine2, 
          addressLine3, zipCode, province, country, regDate)

c.execute("INSERT INTO People VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", params)

The NULL value is for the p_ID primary key column; the alternative is to name all the columns you want to insert values for.
https://www.e-learn.cn/topic/482719

2021 / 06 / 28 error – because the script PowerShell is not allowed to run on this system

Running tool: vscode
error steps: error occurred when installing dependencies with CPM and yarn

solution:

Enter
in the terminal of vscode, which means the user who sets the current scope according to the prompt

Set-ExecutionPolicy -Scope CurrentUser

Please provide values for the following parameters when you enter

remotesigned

If the above methods don’t work, you can try to open the PowerShell as an administrator. There are tutorials on the Internet. But this method doesn’t work for my problem.

A solution to the problem of ineffective MacOS certificate trust configuration (clashx error: sectrustsettingscopycertificates error: – 25262)

Essential problem: certificate trust configuration file is damaged
discovery operation: /usr/bin/security dump trust settings - d
operation result:

SecTrustSettingsCopyCertificates: The Trust Settings Record was corrupted.

Delete /library/security/trust settings/Admin. Plist , which is the configuration file. Go back to the keychain and click trust configuration again

Cause

Clashx can’t even get on it

After

    looking at clashx log: found
    error: x509: failed to load system roots and no roots provided; Sectrustsettingscopycertificates error: - 25262 error checking: sectrustsettingscopycertificates seems to be a function, which has been mentioned in many issues of GitHub, most of which are go and sublime text, such as
    and
    functions https://github.com/golang/go/issues/42414 , to trust digicert global root CA
    Baidu first, said to repair the operating system, So I looked at some of them. Fortunately, there was an upgrade package, but why couldn’t it be changed??Can’t save after clicking??Strange, it’s impossible to find this kind of magic question. Do you really want to ask MAC questions
    delete the import, no, import a new one, no, update it. Sure enough, I didn’t accidentally see an article: https://stackoverflow.com/questions/33224830/error-executing-security-dump-trust-settings-in-sublime-text-3
    /usr/bin/security dump-trust-settings -d??
    the trust settings record was corrupted????Of course you have to pay attention to that?But Baidu came out and found that there was only one. It didn’t know what it was doing. It put it aside first, and it was a mess. When it came back, it used Bing search, and didn’t know how to do it. X2, Google search, the first, classic deletion configuration???https://apple.stackexchange.com/questions/374890/how-to-remove-a-corrupted-trust-settings-record
    / library/security/trust settings/Admin. Plist
    looking back, sure enough, none of the trust configurations have specified values
    as soon as I opened it, I couldn’t see anything, but one of the following UUID’s files was obviously deleted decisively. Trust digicert global root CA again, and you’re done

    However, when updating the clear space, I found that the impression notes took up another 12g, and the handsoff log wrote another 2 g, which solved the problem of “locking up the water in the world” after deleting Xcode, and made the computer live again

1067 – Invalid default value for ‘sex‘1366 – Incorrect string value: ‘\xE6\x8A\x80\xE6\x9C\xAF…‘ f

1067 – invalid default value for ‘sex’
the above error occurred when using SQL statement to create a table in Navicat,
cause: the character set code of the default table is Latin1, so it’s OK to insert numbers, Insert Chinese characters will report an error
solution: alter database database name/table name character set utf8
1366 – incorrect string value: ‘Xe6/x8a/X80/Xe6/x9c/XAF…’ for column ‘depname’ at row 1
reason: the above consistency
problem is that the character set code of the database has been changed before, why the same problem will appear
check the database and I want to The character set code of the inserted table is UTF-8, but the table is not

alter table dep  character set utf8

Still report the same error
check the field code

the character code of the field is Latin_ 1
helpless 😔
change the fields

ALTER TABLE dep CHANGE depname depname 
VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci;

Finally, it has become
but it’s very troublesome to change it all the time. It’s better to change the configuration file of MySQL once and for all