Tag Archives: Miscellaneous notes

Python draw error: ValueError: ‘color’ kwarg must be a color or sequence of color specs. For a sequence of values to b

Error Message:

ValueError: ‘color’ kwarg must be a color or sequence of color specs. For a sequence of values to b
Error Codes:

plt.scatter(data0[:,0],data0[:,1],color='',edgecolor='green',marker='o')

Solution:

plt.scatter(data0[:,0],data0[:,1],color='white',edgecolor='green',marker='o')

[Solved] error getting credentials – err: exit status GDBus.Error:org.freedesktop.DBus.Error.ServiceU

Scene

When using docker-compose to build the environment, the following error messages appear

error getting credentials - err: exit status 1, out: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files

Solution:

sudo apt install gnupg2 pass

[Solved] Windows pycrypto Install Error: ERROR: Failed building wheel for pycrypto

Windows will report an error when installing pycrypto.

Here are some errors

Collecting pycrypto
  Downloading http://mirrors.aliyun.com/pypi/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz (446 kB)
     |████████████████████████████████| 446 kB 344 kB/s
Building wheels for collected packages: pycrypto
  Building wheel for pycrypto (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'd:\ProgramData\Anaconda3\envs\d2t\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\zm\\AppData\\Local\\Temp\\pip-install-trmr6taw\\pycrypto_e1aaae9b5afb410691bac391ddb2c59f\\setup.py'"'"'; __file__='"'"'C:\\Users\\zm\\AppData\\Local\\Temp\\pip-install-trmr6taw\\pycrypto_e1aaae9b5afb410691bac391ddb2c59f\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\zm\AppData\Local\Temp\pip-wheel-egkss95d'
       cwd: C:\Users\zm\AppData\Local\Temp\pip-install-trmr6taw\pycrypto_e1aaae9b5afb410691bac391ddb2c59f\
  Complete output (183 lines):

The solution is:

1. Enter VC directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC

2. Execute vcvarsall.bat

3. Execute set CL=-FI”%VCINSTALLDIR%\INCLUDE\stdint.h”

Install it (I install it in the env of anaconda, so I enter env first)

https://blog.csdn.net/zm274310577/article/details/124927922

[Solved] DDP/DistributedDataParallel Error: RuntimeError: Address already in use

An error is reported when testing pytorch multi card:
store = tcpstore (master_addr, master_port, world_size, start_daemon, timeout)
runtimeerror: address already in use

After investigation, there is another task running with DDP.

Solution:
manually specify an idle port

python -m torch.distributed.launch --master_port 145622

View port occupancy:
terminal input
netstat - nultp

IDEA was Filed to Start: error launching idea (Failed to create JVM )

Failed to start idea

reason:

There is a problem with the configuration file

Solution:

Find the path where idea loads the cache

C:\Users\chen\AppData\Roaming\JetBrains\IntelliJIdea2021.2

Set idea64 exe. The vmoptions parameter is adjusted reasonably, and the error parameters are removed.

You can start successfully!!!

[Solved] Mac ffmpeg Install Error: filenotfounderror: [errno 2] no such file or directory: ‘ffmpeg’: ‘ffmpeg’

Audio processing error: filenotfounderror: [errno 2] no such file or directory: ‘ffmpeg’: ‘ffmpeg’

An error occurs when the following code is executed

import audiosegment

print("Reading in the wave file...")
seg = audiosegment.from_file("voice_data/out_11.wav")

print("Information:")
print("Channels:", seg.channels)
print("Bits per sample:", seg.sample_width * 8)
print("Sampling frequency:", seg.frame_rate)
print("Length:", seg.duration_seconds, "seconds")

print("Detecting voice...")
seg = seg.resample(sample_rate_Hz=32000, sample_width=2, channels=1)
results = seg.detect_voice()
voiced = [tup[1] for tup in results if tup[0] == 'v']
unvoiced = [tup[1] for tup in results if tup[0] == 'u']

print("Reducing voiced segments to a single wav file 'voiced.wav'")
voiced_segment = voiced[0].reduce(voiced[1:])
voiced_segment.export("voiced.wav", format="WAV")

print("Reducing unvoiced segments to a single wav file 'unvoiced.wav'")
unvoiced_segment = unvoiced[0].reduce(unvoiced[1:])
unvoiced_segment.export("unvoiced.wav", format="WAV")

Error content

Solution:
use the command: brew install ffmpeg installation. If the following problems occur, let’s continue brew install ffmpeg installation without turning off the error message.

==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c16266957db69346464e39967d41d5198f3550423d6
############################                                              40.0%
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
Error: ffmpeg: Failed to download resource "rav1e"
Download failed: https://ghcr.io/v2/homebrew/core/rav1e/blobs/sha256:c16266957db69346464e39967d41d5198f3550423d6aabfb62919975cf52ea19

After that, new error messages are found as follows:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
  rm '/usr/local/bin/2to3'

To force the link and overwrite all conflicting files:
  brew link --overwrite [email protected]

To list all files that would be deleted:
  brew link --overwrite --dry-run [email protected]

Follow the prompts and execute the following statements:

 rm '/usr/local/bin/2to3'
 brew link --overwrite [email protected]
 brew link --overwrite --dry-run [email protected]

[Solved] The version of springcloud must support the current version of springboot, otherwise the startup project will report an error: error starting ApplicationContext

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2021-06-26 15:42:31.976 ERROR 208496 — [           main] o.s.b.d.LoggingFailureAnalysisReporter   :
***************************
APPLICATION FAILED TO START
***************************
Description:
Your project setup is incompatible with our requirements due to following reasons:
– Spring Boot [2.3.0.RELEASE] is not compatible with this Spring Cloud release train

Action:
Consider applying the following actions:
– Change Spring Boot version to one of the following versions [2.4.x, 2.5.x] .
You can find the latest Spring Boot versions here [https://spring.io/projects/spring-boot#learn].
If you want to learn more about the Spring Cloud Release train compatibility, you can visit this page [https://spring.io/projects/spring-cloud#overview] and check the [Release Trains] section.
If you want to disable this check, just set the property [spring.cloud.compatibility-verifier.enabled=false]

Disconnected from the target VM, address: ‘127.0.0.1:10542’, transport: ‘socket’
Process finished with exit code 1
Follow the prompts to upgrade the SpringBoot version or lower the SpringCloud version to make both support each other.The reason for the error is that when I followed the online tutorials to write the code, the SpringBoot version of the pom in the project automatically generated by IDEA was aligned with the tutorials and the project started with an error. In order to follow less errors, I downgraded the version of SpringCloud to be consistent with the one in the tutorial.

2020.03

Amend to read

Hoxton.SR8

Restart project OK

Gyp err! Build error stack error

Error content:

gyp ERR! build error
gyp ERR! stack Error: `C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe` failed with exit code: 1

Repeat several times and still report an error.
Check the problem. The yarn version is normal, and the image is also a Taobao image.

solve:

1. Execute NPMI – G node gyp command
2. Delete directory/node_ All files under modules
3. Re install.

In addition, it can be seen on the Internet that it may be due to the node version. The node version needs to be lowered. I didn’t try this method. I don’t know if it’s feasible.