Category Archives: How to Fix

How to Solve apt get update problem: usr/lib/apt/methods/HTTPS could not be found_PUBKEY 7EA0A9C3F273FCD8

Error 1: The method driver /usr/lib/apt/methods/https could not be found.

Detecting detection –exec autodetection commands: apt-get install apt-transport-https

*

Error2: W: GPG error: https://download.docker.com/linux/ubuntu xenial InRelease: The following signatures could not be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8

Run as command, add 38053; decide:\ apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 7EA0A9C3F273FCD8

*

ERROR information:

root@2bade87bd9dd :/# apt-get update

Hit:1 http :// mirrors.aliyun.com/ubuntu xenial InRelease

Get:2 http :// mirrors.aliyun.com/ubuntu Xenial-updates InRelease [109 kB]

Get:3 http :// mirrors.aliyun.com/ubuntu Xenial-backports InRelease [107 kB]:

Get:4 http :// mirrors.aliyun.com/ubuntu xenial-security InRelease [107 kB]

Get:5 http :// mirrors.aliyun.com/ubuntu Xenial-updates/main sources [406 kB]:

Get:6 http :// mirrors.aliyun.com/ubuntu Xenial-updates/restricted sources [2684 B]:

Get:7 http :// archive.canonical.com/ubuntu Xenial InRelease [11.5 kB]

Get:8 http :// mirrors.aliyun.com/ubuntu xenial-updates/multiverse Sources [8995 B]:

Hit:9 http :// archive.ubuntu.com/ubuntu Xenial InRelease

Get:10 http :// mirrors.aliyun.com/ubuntu xenial-updates/universe Sources [280 kB]

Get:11 http :// mirrors.aliyun.com/ubuntu xenial-updates/main amd64 Packages [1112 kB]

Get:12 http :// archive.canonical.com/ubuntu Xenial/partner sources [2408 B]:

Get:13 http :// mirrors.aliyun.com/ubuntu xenial-updates/restricted amd64 Packages [13.1 kB]

Get:14 http :// mirrors.aliyun.com/ubuntu xenial-updates/universe amd64 Packages [889 kB]

Get:15 http :// archive.canonical.com/ubuntu xenial/partner amd64 Packages [3248 B]

Get:16 http :// mirrors.aliyun.com/ubuntu xenial-updates/multiverse amd64 Packages [18.8 kB]

Get:17 http :// mirrors.aliyun.com/ubuntu xenial-backports/main Sources [5103 B]

Get:18 http :// mirrors.aliyun.com/ubuntu xenial-backports/universe Sources [7237 B]

Get:19 http :// mirrors.aliyun.com/ubuntu xenial-backports/main amd64 Packages [7965 B]

Get:20 http :// mirrors.aliyun.com/ubuntu xenial-backports/universe amd64 Packages [8532 B]

Get:21 http :// mirrors.aliyun.com/ubuntu xenial-security/main Sources [167 kB]

Get:22 http :// mirrors.aliyun.com/ubuntu xenial-security/multiverse Sources [2094 B]

Get:23 http :// mirrors.aliyun.com/ubuntu xenial-security/universe Sources [95.4 kB]

Get:24 http :// mirrors.aliyun.com/ubuntu xenial-security/main amd64 Packages [723 kB]

Get:25 http :// mirrors.aliyun.com/ubuntu xenial-security/universe amd64 Packages [491 kB]

Get:26 http :// mirrors.aliyun.com/ubuntu xenial-security/multiverse amd64 Packages [3747 B]

Fetched 4583 kB in 2s (2049 kB/s)

Reading package lists… Done

E: The method driver /usr/lib/apt/methods/https could not be found.

N: Is the package apt-transport-https installed?

Failed to fetch https://download.docker.com/linux/ubuntu/dists/xenial/InRelease *

E: Some index files failed to download. They have been ignored, or old ones used instead.

root@2bade87bd9dd :/#

Detecting detection –exec autodetection commands: apt-get install apt-transport-https

root@2bade87bd9dd :/# apt-get install apt-transport-https

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following package was automatically installed and is no longer required:

* libllvm5.0

Use ‘apt autoremove’ to remove it.

The following new packages will be installed:

From apt-transport-https

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 26.1 kB of archives.

After this operation, 215 kB of additional disk space will be used.

Get:1 http :// mirrors.aliyun.com/ubuntu xenial-updates/main amd64 apt-transport-https amd64 1.2.27 [26.1 kB]

Fetched 26.1 kB in 0s (446 kB/s)

debconf: delaying package configuration, since apt-utils is not installed

Selecting previously unselected package apt-transport-https.

(Reading database … 32433 files and directories currently installed.)

Preparing to unpack …/apt-transport-https_1.2.27_amd64.deb …

Unpacking apt-transport-https (1.2.27) …

Setting up apt-transport-https (1.2.27) …

root@2bade87bd9dd :/#

*

root@2bade87bd9dd :/# apt-get update Hit:1 http :// mirrors.aliyun.com/ubuntu Release Hit:2 http :// mirrors.aliyun.com/ubuntu Xenial-updates InRelease Hit:3 http :// mirrors.aliyun.com/ubuntu xenial-backports InRelease I’m sorry. Hit:4 http :// mirrors.aliyun.com/ubuntu Xenial-security InRelease Hit:5 http :// archive.canonical.com/ubuntu xenial Inrelease I’m sorry, I’m sorry. Get:6 https :// download.docker.com/linux/ubuntu xenial InRelease [66.2 kB] * * *
Ign:6 https :// download.docker.com/linux/ubuntu Genial InRelease Get:7 https :// download.docker.com/linux/ubuntu xenial/stable amd64 Packages [4467 B]
Hit:8 http://archive.ubuntu.com/ubuntu Xenial InRelease Done
W: GPG error: https://download.docker.com/linux/ubuntu xenial InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
W: The repository ‘ https://download.docker.com/linux/ubuntu xenial InRelease ‘is not signed.
N: Data from such a repository can’t be authenticated
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@2bade87bd9dd :/#

to solve the detective:

According to the following commands, it adds 38053;:

apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 7EA0A9C3F273FCD8

root@2bade87bd9dd :/# apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 7EA0A9C3F273FCD8 Thumbnail: /tmp/tmp.1aB371lWPG/gpg.1.sh –recv-keys
–keyserver
keyserver.ubuntu.com
7EA0A9C3F273FCD8
gpg: requesting key F273FCD8 from hkp server keyserver.ubuntu.com
gpg: key 0EBFCD88: public key “Docker Release (CE deb) < [email protected] ” imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@2bade87bd9dd :/# <
root@2bade87bd9dd :/# <
root@2bade87bd9dd :/# apt-get update
Hit:1 http :// mirrors.aliyun.com/ubuntu Release Hit:2 http :// mirrors.aliyun.com/ubuntu xenial-updates InRelease :: I’m sorry. Hit:3 http :// mirrors.aliyun.com/ubuntu Xenial-backports InRelease Hit:4 http :// mirrors.aliyun.com/ubuntu xenial-security InRelease
Hit:5 http :// archive.ubuntu.com/ubuntu Xenial Inrelease ≥ 1 ≥ 2 Hit:6 http :// archive.canonical.com/ubuntu Release Get:7 https :// download.docker.com/linux/ubuntu xenial InRelease [66.2 kB]
Fetched 66.2 kB in 1s (50.8 kB/s) &
Reading package lists… Done
root@2bade87bd9dd :/#

How to Solve failed Precondition Error: attempting to use uninitialized value beta1_power

Solving failed precondition error: attempting to use uninitialized value beta1_ power

Using TensorFlow to implement ctpn, the code is like this

init=tf.global_variables_initializer()
opt=tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(loss)

Error failed precondition error: attempting to use uninitialized value beta1_ power

Traceback (most recent call last):
  File "/home/yiverin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call
    return fn(*args)
  File "/home/yiverin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1319, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/yiverin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1407, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.FailedPreconditionError: Attempting to use uninitialized value beta1_power
	 [[{{node beta1_power/read}} = Identity[T=DT_FLOAT, _class=["loc:@Adam/Assign_1"], _device="/job:localhost/replica:0/task:0/device:CPU:0"](beta1_power)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/ctpn/main/train.py", line 159, in <module>
    tf.app.run()
  File "/home/yiverin/.local/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "/tmp/ctpn/main/train.py", line 145, in main
    input_im_info:data[2]})
  File "/home/yiverin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 929, in run
    run_metadata_ptr)
  File "/home/yiverin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1152, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/yiverin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run
    run_metadata)
  File "/home/yiverin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.FailedPreconditionError: Attempting to use uninitialized value beta1_power
	 [[node beta1_power/read (defined at /tmp/ctpn/main/train.py:127)  = Identity[T=DT_FLOAT, _class=["loc:@Adam/Assign_1"], _device="/job:localhost/replica:0/task:0/device:CPU:0"](beta1_power)]]

See attaching to use uninitialized value beta1_ The answer to this question is
change the order of these two lines

opt=tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(loss)
init=tf.global_variables_initializer()

Since AdamOptimizer has it’s own variables, you should define the initilizer init after opt, not before.

Done!

How to Fix TypeError: Cannot cast array data from dtype(‘float64‘) to dtype(‘<U32‘)….

Both U32 and S32 indicate that your NumPy array is a string array, not a number array. Check whether there are strings in the dataset. If there are, just delete them. In NumPy array, as long as one item is a string, the type returned by the array is a string array.
If you need to convert numpy to floating-point number, please refer to the code:
train= train.astype (float)
train_ target = train_ target.astype (float)

Solution pandas.errors.ParserError : Error tokenizing data. C error: Buffer overflow caught

When using the panda package, pd.read_ csv(r’.\data\ data.csv ’, encoding =’utf-8 ‘, header = none,)
error message: pandas.errors.ParserError : Error tokenizing data. C error: Buffer overflow caught – possible malformed input file.

I read some blogs and said that the parameter error was added_ bad_ Lines = false
but it’s no use trying

After reading another blog, I said that it might be caused by modifying the suffix of the file. I did change the suffix of. Xlsx to. CVS
so you can change the suffix back to. Xlsx and use pd.read_ Excel () function can be
or you can create a new table with Excel, copy the data, and then save it as a. CSV file

There will also be coding problems, which you can see in my previous blog posts

ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory

When installing cudnn, after the installation, import tensorflow will have the error in the question,

This error is either caused by the configuration of environment variables or the establishment of cudnn connection.

1. Environmental variables

Add at the end of ~ /. Bashrc

export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}

export LD_ LIBRARY_ PATH=/usr/local/cuda/lib64${LD_ LIBRARY_ PATH:+:${LD_ LIBRARY_ PATH}}

export CUDA_ HOME=/usr/local/cuda

2. Cudnn connection establishment

 cd /usr/local/cuda/lib64

sudo rm -rf libcudnn.so libcudnn.so . 7 # delete the original version number, which is queried in cudnn / lib64

sudo ln -s libcudnn.so .7.0.5 libcudnn.so . 7 # generate a soft connection and pay attention to the version number you download

sudo ln -s libcudnn.so .7 libcudnn.so  

Sudo ldconfig # effective immediately

 

unable to read askpass response from ‘/usr/libexec/openssh/gnome-ssh-askpass

Today, in Git push origin master, the error “unable to read ask pass response from ‘/ usr / libexec / openssh / Gnome SSH ask pass
appears

Search out the following paragraph. Let SSH_ Askpass can be turned off.

However, for some wierd reason, upon trying to pull/push commits from/to the Git repository, the bash shell tries to open the gnome-ssh-askpass dialogue and it fails. I wanted to prevent the bash shell from attempting to launch the dialogue box. To do this, all I had to do is run the following command in the terminal:
$ unset SSH_ ASKPASS

To prevent it in future, you can add the above line in your .bashrc or .bash_ profile.

Wish you trouble-free working!

MAMP failed to start: Apache could’t be started. Please check your MAMP installation and configuration

Solution 1:

In / applications / MAMP / library / bin, find the file envvars and rename it to_ envvars。

It doesn’t work for me.

Solution 2:

sudo /Applications/MAMP/bin/startApache.sh

or

sudo /Applications/MAMP/Library/bin/apachectl start

There is no display.

Solution 3:

Change document root to a fixed address that you don’t know how to delete.
MAMP > Preferences > Server > Document Root

Still failed.

Solution 4:

sudo /Applications/MAMP/Library/bin/apachectl restart

report errors:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
httpd not running, trying to start

I solved it lazily

Final solution

I had a video conference with the professor. He asked me to come to him

    delete the installation package, turn off the computer, wait for five minutes, and then turn on the system. If there is an update, update it, and then download the MAMP software again

    Well I guess it’s the system update that works, updating Catalina to Big Sur
    as a person who doesn’t shut down several times a year, and who can delay several versions of the update
    After doing all the above honestly In front of the professor, there was no problem at all, and then he was connected
    for a time, I was a little embarrassed, and I told him by email how many attempts I had made I’m impressed

    reference resources

      Apache server cannot start why won Apache server start in MAMP

Importerror of [docker] error: libGL.so .1: cannot open shared object file: No such file or directory

ImportError: libGL.so . 1: cannot open shared object file: no such file or directory

In the container libGL.so . 1 problem reference

 

In the container libGL.so 1. Problems

When I ran the python version of yolov3 on the server of the laboratory, I ran well a few days ago, but suddenly I didn’t know what was going on, so I began to report an error, and I was confused.
Later Baidu got a lot of… EMM is not going well, so mark it.
ImportError: libGL.so .1: cannot open shared object file: No such file or directory。

The environment is Ubuntu 16.04.
Instruction:
apt update
apt install libgl1 mesa GLX

quote

Thank you guys….
[1]: https://www.ohazyi.com/docker-docs/
[2]: https://github.com/conda-forge/pygridgen-feedstock/issues/10

“Could not import PIL.Image . The use of array_ to_ The solution of img requires PIL. “

Based on dataset training_ According to the structure provided, CNN model is established to identify the cat / dog in the picture and calculate the prediction accuracy:
1_ Set test data prediction accuracy
2

When building CNN model to identify the cat / dog in the picture, through the load in keras under the framework of tensorflow_ Img() encountered the following error when loading the picture:

ImportError: Could not import PIL.Image. The use of array_to_img requires PIL.Image

Find solutions through the Internet and try them in person. The solutions are as follows:
the main reason is that pilot is not installed because load is used_ The img() function requires pilot

(base) C:\Users\Administrator>activate tensorflow
(tensorflow) C:\Users\Administrator>pip3 install pillow
Collecting pillow
  Downloading Pillow-7.2.0-cp36-cp36m-win_amd64.whl (2.0 MB)
     |████████████████████████████████| 2.0 MB 7.4 kB/s
Installing collected packages: pillow
Successfully installed pillow-7.2.0

The problem has been solved.

Refer to
1. Importerror: could not import PIL.Image . The use of array_ to_ img requires PIL.
2.ImportError: Could not import PIL.Image . The use of array_ to_ img requires PIL.

Some projects cannot be imported because they already exist in the workspace

Some projects cannot be imported because they already exist in the But I have modified the project name in the. Project file, but I still can’t import it. I found this article from the Internet. It turns out that you need to find the relevant record in the eclipse workspace and delete it: there is no project with the same name in the workspace, but there must be a place to record the previous project information, which may be… Find the following: XXXXXXXX, workspace,. Metadata,. Plugins\ org.eclipse.core . resources \. Projects folder, delete the folder with the same name

Record how to solve this problem:

MyEclipse is unable to import Java projects. There are two common situations:

1、Some projects cannot be imported because they already exist in the workspace

2、Some projects were hidden because they exist in the workspace directory

Reason: a project with the same name already exists in the workspace, so it cannot be imported.

solve:

1. Modify project name: right click refactor rename or F2

2. Open the. Project file in the project — modify & lt; name & gt; ProjectName & lt; / Name & gt;

3. There is no project with the same name in the workspace. There must be a place to record the previous project information… Find the following: XXXXXXXX, workspace,. Metadata,. Plugins\ org.eclipse.core . resources \. Projects folder, delete the folder with the same name.

Article from http://blog.csdn.net/leo_ Thanks to the author.

Sklearn ValueError: empty vocabulary; perhaps the documents only contain stop words

Chinese corpus:

A list of words

I don’t have much inside glory
If Huawei users find that the battery life is less than one day, please use Mr. Yu’s microblog to protect their rights reasonably
it’s cheaper than 500 g

use

CountVectorizer()

report errors:

Sklearn ValueError: empty vocabulary; perhaps the documents only contain stop words

 

Question:

def __init__(self, input='content', encoding='utf-8',
             decode_error='strict', strip_accents=None,
             lowercase=True, preprocessor=None, tokenizer=None,
             stop_words=None, token_pattern=r"(?u)\b\w\w+\b",
             ngram_range=(1, 1), analyzer='word',
             max_df=1.0, min_df=1, max_features=None,
             vocabulary=None, binary=False, dtype=np.int64):

Solution

Countvectorizer () defaults to analysis = “word”, and changes to countvectorizer (analysis = “char”, lowercase = false)