Category Archives: How to Fix

Call Excel to report an error (the exception comes from HResult: 0x80010105 (RPC)_ SERVERFAULT))

Method 1: wk. Visible = true can be set; But this method will open the excel, show the effect is not good.

Method 2: in Excel 2007, click “office button”, click “excel option”, click “add in”, select “com add in” in the bottom drop-down box, click “go” button, the box will pop up, remove the add in of PDF, then OK.

Layer loading failed! Exception from HResult: 0x80040228

When loading ShapeFile data in ArcEngine development, an error is reported: “layer loading failed! Exception from HResult: 0x80040228 “. The problem number belongs to the authorization problem. First, check whether to add a license control. After it has been added, it is found that the error reporting place is when creating the ShapeFile workspace, the following methods are adopted to solve the problem.

Open the program.cs class and add the following code in the corresponding position of the class:

(1)using ESRI.ArcGIS.esriSystem;

(2)

IAoInitialize m_aoinitialize = new AoInitializeClass();
m_aoinitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeEngine);  

As follows:

Server configuration excel export HResult: 0x800A03EC

The exception prompt is as follows:
Microsoft Office Excel cannot access the file “*. XLS”. The possible reasons are:
1 the file name or path does not exist this is an unexplained error. Debugging on the local machine is normal, but once it is deployed to the server, it cannot be accessed

After checking some information, we found that everyone encountered this problem

The solution is to create a directory named desktop under the directory of C: windows, system32, config, systemprofile and C: windows, syswow64, config, systemprofile

For the problem that COM components cannot be accessed,
solution:
1.
1). Add simulation in webconfig and add administrator permissions,

2). In this way, you can start the application process, operate excel, create new EXCEL and export Excel, but you still can’t open the excel file on the server side
however, this method has a disadvantage: if you, If the crystal report is used in the project, the crystal report will be abnormal, so the handout is handled in the latter way
2.
in the component service, DOCM sets the attributes of Microsoft Excel application,
because it operates on a 64 bit system, docom does not have it by default in the component service, because Microsoft Excel application is a DCOM configuration of 32, So solve it in the following way (refer to step 3)

    1) . start –> run –> CMD
    2) at the command prompt, enter comexp.msc – 32 to open the 32 console
    3). In the file menu, add and delete snap ins –> component services
    4). Find “Microsoft Excel application” in “DCOM configuration”, right-click it, and then click “properties”, The “Microsoft Excel application properties” dialog box will pop up
    5). Click the “identity” tab and select “interactive user”
    6). Click the “security” tab, click “custom” on the “start and activate permissions”, and then click the corresponding “Edit” button to fill in a “network service” user in the pop-up “security” dialog box, And give it the “local start” and “local activation” permissions
    7). It is still the “security” label. Click “custom” on the “access permission”, and then click “Edit”. In the pop-up “security” dialog box, a “network service” user is also added, Then give “local access” permission.
    the specific figure is as follows:






    Exception from HRESULT: 0x80041FE2

    Installation vs community version, new project appears:

    Exception from HRESULT: 0x80041FE2

    Reasons for the problem:
    when installing, the Linux related environment was selected. When creating the project, the visual c + + project was created, because these components were not installed, an error was reported
    Creating Linux related projects will not.

    Solution / error of. Net framework 4.0 installation failure HResult 0xc8000222 solution

    When installing. Net framework 4.0, you will encounter the following error page,

    Next, I will post solutions for you

    1. After inputting CMD in the start menu, the CMD command input window will pop up

    2. Enter net stop wuauserv in the above CMD command line

    3. Continue to enter echo% windir%

    4. Change the name of the software distribution folder in the pop-up folder (usually C: Windows)

    5. Continue to enter net start wuauserv  

    6. Install net4.0 again and it will be successful

    //If you think the above command is troublesome, you can paste and copy it to the CMD window with the mouse

    Pyspark36830;- 25509;- Postgresql38169; java.lang.ClassNotFoundException: org.postgresql.Driver

    How to connect pyspark with PostgreSQL

    Method 1: the PostgreSQL jar package placed in the spark2/jars path does not work. (error)

    Method 2: setting spark. Conf. set in spark. Conf. set (‘spark. Jars’, ‘/ usr/HDP/3.0.1.0-187/spark2/jars/postgresql-42.2.5. Jar’) does not work. (error)

    Solution

    When starting pyspark, add parameters after it

    pyspark –jars  / usr/hdp/3.0.1.0-187/spark2/jars/postgresql-42.2.5.jar

    That’s fine

    Used by: Java. Lang. classnotfoundexception: org. PostgreSQL. Driver

    Always report an error saying that failed by: Java. Lang. classnotfoundexception: org. PostgreSQL. Driver

    After a series of searching to find out the reasons, such as the quotation in the box is wrong, I can’t quote what I need;

    Only the writing method as shown in the figure below can be quoted successfully,

    In memory of the time I’ve been tossing about, it’s also a small lesson of using gradlew for the first time

    Sending ‘const NSString *__strong‘ to parameter of type ‘NSString *‘ discards qualifiers

    String value encountered a warning message, record it

    Sending 'const NSString *__strong' to parameter of type 'NSString *' discards qualifiers
    

    The code is written like this

    UIKIT_EXTERN const NSString * kNetworkType;
    

    This warning will be issued when using it, and it will be changed to:

    UIKIT_EXTERN NSString * const kNetworkType;
    

    If const is placed after nsstring *, there will be no warning.

    Causes and solutions of nm test o file format not recognized

                   

            Recently, I wrote makefile,   Encountered the error nm: test. O: file format not recognized. Let’s see:

            test.h:

    void output();

            test.cpp:

    #include <stdio.h>#include "test.h"void output(){ printf("c is good\n");}

              compile:

    xxxxxx:~/mkfile> g++ -c test.cpp test.h -o test.oxxxxxx:~/mkfile> nm test.onm: test.o: File format not recognizedxxxxxx:~/mkfile>

              Strange, isn’t it?The reason is that there are too many test. H files. There is no need at all. The compiler will find them automatically as long as you specify the directory.   If you change the order of test. H and test. CPP, you will be prompted:

    xxxxxx:~/mkfile> g++ -c test.h test.cpp -o test.og++: cannot specify -o with -c or -S with multiple filesxxxxxx:~/mkfile> 

              We have already said that.

              It seems that when there is – O, you can go to – C to specify multiple files, which is a huge pit.

               

    Let’s share my teacher Dashen’s AI course. Zero base! Easy to understand! Funny! And yellow jokes! Hope you can join our AI team! https://blog.csdn.net/jiangjunshow

    Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3

    Python 2 writes binary file randomly:

    with open('/python2/random.bin','w') as f:
        f.write(os.urandom(10))

    However, using Python 3 will report an error:

    TypeError:must be str, not bytes

    The reason is: Python 3 adds a new parameter named encoding to the open function, and the default value of this new parameter is “UTF-8”. In this way, when the read and write operations are carried out on the file handle, the system requires the developer to pass in the instance containing Unicode characters instead of the byte instance containing binary data.

    resolvent:

    Use binary write mode (“WB”) to open the file to be operated, instead of using character write mode (“W”) as before.

    The method of adapting both Python 3 and python 2 is as follows

    with open('python3/rndom.bin','wb') as f:
        f.write(os.urandom(10))

    There is a similar problem when the file reads data. The solution to this problem is similar: open the file in ‘RB’ mode (binary mode) instead of ‘R’ mode.

    Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3

    Python 2 writes binary file randomly:

    with open('/python2/random.bin','w') as f:
        f.write(os.urandom(10))

    However, using Python 3 will report an error:

    TypeError:must be str, not bytes

    The reason is: Python 3 adds a new parameter named encoding to the open function, and the default value of this new parameter is “UTF-8”. In this way, when the read and write operations are carried out on the file handle, the system requires the developer to pass in the instance containing Unicode characters instead of the byte instance containing binary data.

    resolvent:

    Use binary write mode (“WB”) to open the file to be operated, instead of using character write mode (“W”) as before.

    The method of adapting both Python 3 and python 2 is as follows

    with open('python3/rndom.bin','wb') as f:
        f.write(os.urandom(10))

    There is a similar problem when the file reads data. The solution to this problem is similar: open the file in ‘RB’ mode (binary mode) instead of ‘R’ mode.

    Reproduced in: https://www.cnblogs.com/circleyuan/p/10350202.html