Tag Archives: development language

[Solved] fatal error: cannot write PCH file: required memory segment unavailable

Error Message:

fatal error: cannot write PCH file: required memory segment unavailable
make[4]: *** [Makefile:1904: arm-eabi/bits/extc++.h.gch/O2g.gch] Error 1
make[4]: Leaving directory ‘/d/gnu/gcc-12.2.0-build/arm-eabi/libstdc+±v3/include’
make[3]: *** [Makefile:576: all-recursive] Error 1
make[3]: Leaving directory ‘/d/gnu/gcc-12.2.0-build/arm-eabi/libstdc+±v3’
make[2]: *** [Makefile:501: all] Error 2
make[2]: Leaving directory ‘/d/gnu/gcc-12.2.0-build/arm-eabi/libstdc+±v3’
make[1]: *** [Makefile:12620: all-target-libstdc+±v3] Error 2

 

 

Solution:

Downgrade your GCC pack, because there are some bugs in your current gcc-12.2.0. you can go to the official website or the following link to download it:

http://ftp.gnu.org/gnu/gcc/

[Solved] pandas ExcelWrite AttributeError: ‘NoneType‘ object has no attribute ‘group‘

An error is reported when writing the specified cell. When the following two sentences are executed

name_format = workbook.add_format({'font_color': '#0000FF'})
worksheet.write('k1', os.path.basename(gtk_agile_bom_path), name_format)
worksheet.write('k1', os.path.basename(gtk_agile_bom_path), name_format)
  File "E:\Gerrit_Project\pyenv\bomflyenv\lib\site-packages\xlsxwriter\worksheet.py", line 82, in cell_wrapper
    new_args = xl_cell_to_rowcol(first_arg)
  File "E:\Gerrit_Project\pyenv\bomflyenv\lib\site-packages\xlsxwriter\utility.py", line 126, in xl_cell_to_rowcol
    col_str = match.group(2)
AttributeError: 'NoneType' object has no attribute 'group'

 

Solution:

I found that k1,k lowercase can not be written, change it to the upper case: K1, and then run it OK

worksheet.write('K1', os.path.basename(gtk_agile_bom_path), name_format)

[Solved] devTools failed to load sourcemap: Could not parse content for map

devTools failed to load sourcemap: Could not parse content for map

Error
Console report an error: devTools failed to load sourcemap: Could not parse content for map

Solution:
Console settings, just uncheck the source map
Enable JavaScript source maps
Enable CSS source maps

Failed to Create New Environment Error: Collecting package metadata (current_repodata.json): failed.

Recently, due to the need to set up a new environment for the GUI interface, an error occurred in the header line during the process of creating a new environment. 

The significance of creating a new environment
As each project requires different libraries and their versions, running the project in the root directory will be much more complicated, which is why many people will choose to use a virtual environment. That is, suppose you do project A with package versions PyQt5=’5.5.1′ and sklearn=’0.22.1′, and project B with package versions PyQt5=’5.6.1′ and sklearn=’0.23.1′, then you have to uninstall PyQt5 5.5.1 and sklearn0.22.1 and install PyQt5 5.6.1′ and sklearn0.23.1, but then you have to uninstall the previous package version to do something like project 1, so it’s a lot of trouble to go back and forth, so why not create virtual environment A with PyQt5 5.5.1 and sklearn0.22.1, virtual environment B with PyQt5 5.6.1′ and sklearn0.23.1, and do project A will use virtual environment A, and project B will use virtual environment B, which will not interfere with each other and improve the convenience a lot.

Question restatement:

If you have reinstalled anaconda, a file named .condarc will be automatically generated in the user directory on the C drive.
When using the commands conda install and conda create, the following problem occurs: Collecting package metadata (current_repodata.json): failed

First, a few words about the role of the .condarc file.

.condarc starts with a dot and generally indicates the configuration file for the conda application, in the user’s home directory (windows: C:\\users\\\username\\, linux: /home/username/).

For the .condarc configuration file, which is an optional (optional) runtime configuration file, this file is not available by default and is only created automatically after you have executed the conda config command. This file is the configuration file for conda in YAML format. For example, you can set the channel to install the package, whether to automatically update conda, whether to allow other channels, and other settings.

Solution:

1. Open Anaconda Prompt and enter the following command

conda config --show-sources

As shown in the figure, the running result is displayed that the .condarc file is in the C:\Users\DELL folder

2. Delete .condarc file

The problem was solved successfully!!!

[Solved] PHP Error: Warning: file_get_contents(): Failed to enable crypto

I. Description
file_get_contents() error when reading https content

II. Reason
Local service is not configured ssl certificate, can not get the contents of the path to https

III. Solution
1, Linux server configuration https ssl certificate.
Linux server configuration https ssl certificate.
2. curl_ request to obtain the content (see the following method curlGet ())

    /**
     * get the content
     * @param $url
     * @return bool|string
     */
    function curlGet($url)
    {
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36');
        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
        $content = curl_exec($ch);
        curl_close($ch);
        return ($content);
    }

3.Use file_get_contents() function to skip https authentication

        $streamOpts = [
            'ssl' => [
                'verify_peer' => false,
                'verify_peer_name' => false
            ]
        ];
        $html = file_get_contents($pageUrl, false, stream_context_create($streamOpts));

[Solved] Django backend error: Assertion failed: (NSViewIsCurrentlyBuildingLayerTreeForDisplay()

Complete error

Assertion failed: (NSViewIsCurrentlyBuildingLayerTreeForDisplay() != currentlyBuildingLayerTree), function NSViewSetCurrentlyBuildingLayerTreeForDisplay

Solution

Because matplotlib is used in the backend, Add the following codes in the drawing code:

import matplotlib
matplotlib.use('Agg')

Then use the following code after the drawing is over:

plt.close()

Julia LoadError: Failed to precompile GR [How to Solve]

Julia LoadError: Failed to precompile GR problem solving

Suddenly reported an error after running,It doesn’t work whether it is uninstalled and then installed
here Insert picture description
I suddenly thought about whether the version is too high or not

Update the specified version in the package manager, I will update to the next-level version and the problem will be solved.
insert image description here

How to Solve jmeter Install Error (Three Common Errors)

Error 1: jmeter is not an internal command

1. New environment variables

Variable name: JMETER_HOME

Variable value:location where jmeter is installed(such as: D:\othersoftware\jmeter\apache-jmeter-5.5)

2. Edit CLASSPATH(Separate with a semicolon when there are multiple CLASSPATHs)

CLASSPATH:%JMETER_HOME%\lib\ext\ApacheJMeter_core.jar;%JMETER_HOME%\lib\jorphan.jar

3. Edit path(If there are multiple Paths, separate them with semicolons)

path: %JMETER_HOME%\bin, then click OK

Enter jmeter -v on the command line to display the version number and the configuration is successful

Error 2: the Java executable or version could not be found, Please check your Java installation

1. Install jdk

2. Configure environment variables

Add JAVA_HOME: JDK installation location

EDIT CLASSPATH: %JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar

edit path: %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin

Save, Enter java -version on the command line to display the version number and the configuration is successful

Error 3: error: ‘findstr’ is not an internal or external command, nor a runnable program or batch file

Add: %SystemRoot%/system32;%SystemRoot%; to Path in the configuration environment

Save, Enter jmeter in cmd to start

Gephi cannot find Java 1.8 or higher [How to Solve]

Previously installed Gephi and configured the Java environment, but not used for more than a year, recently opened Gephi reported an error:

cannot find Java 1.8 or higher

I followed the [online tutorial] to set the jdkhome variable in Gephi.conf as follows:

jdkhome="C:/Users/username/AppData/LocalLow/Oracle/Java/jdk11.0.9_x64& #34;

Another error was reported:

Cannot locate java installation in specified jdkhome

I read a bunch of posts on the Internet again, guess that my Java is not installed in the default path, but installed in the D drive, And the Gephi.conf file should only use Associate to the installation path of Java to, reconfigure:

jdkhome="D:/Program Files/JAVA sdk"

Gephi can be opened normally.

dtype=np.int error: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`.

There is a line of code c = np.fromfile(“b.dat”, dtype=np.int, sep=”,”) when running Error,The content is as follows:

DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20 .0-notes.html#deprecations
c = np.fromfile(“b.dat”, dtype=np.int, sep=”,”)

Reason: numpy1.20 has deprecated np.int, checked my version

The numpy version has reached 1.23.2

Solution: Change to np.int16/np.int32 directly to specific bytes or change to np.int_

Run again, problem-solved!

 

[Solved] Error: error C2601: ‘b‘ : local function definitions are illegal error C2063: ‘b‘ : not a function

Scene:

In general, this problem may be that a "}" is missing
There is also a small probability that your C++standard library is C++98 or earlier, which does not support non built-in initialization list writing.


the Situation of Missing ‘}’

We can see that if our test1 method is short of one}, all subsequent functions will report errors. We need to check it carefully

Solution
Check for yourself that the first line of code near the line number that reports the error is missing a }.

C++ standard does not support
When your C++ standard is C++98, the initialization list of C++98 does not support the initialization list methods of non-built-in types. This can be seen in the following code

#include <iostream>
#include <vector>
#include <map>
using namespace std;

int main()
{
	int a[] = { 1, 2, 3 };

	int b[] {1, 2, 3};
	vector<int> v{1,5,5};
	map<int, float> m{{1, 2.f}, {2, 3.2f}};

	return 0;
}

编译结果:

Solution:
Then in this case your non-built-in type variables will have to be initialized using other methods