Tag Archives: Experience sharing

Solution of running error reporting attributeerror: ‘rectangle’ object has no property ‘normalized’

Have a problem

When running the code, the following error prompt appears:

AttributeError:'Rectangle' object has no property 'normed'

resolvent

The reason is that the library has been updated and there is no such attribute. Delete the normal in the code (no error, but it seems that it can’t be drawn)

Replace the normal attribute in the code with density , and add an attribute stacked = true .


Thank you for your comments.

Cmake[Warning]:Policy CMP0054 is not set

Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted

Refer to prompt cause solution

reference resources

How to use variables and avoid CMP0054 policy violations?CMP0054

Prompt reason

Note: You only get the CMP0054 warning if the context of your variable was actually evaluated again (so it’s a hint your CMake code will not work in those places).

solve

cmake_policy(SET CMP0054 NEW)

Python error TypeError:can ‘t convert complex to float

Python error TypeError:can ’t convert complex to float

Error: rep [I, J] = Data_ Value [- 1]
I searched the Internet for a long time, but I couldn’t solve it. Finally, the students took a look for help. It turned out that when I read the TIF file repeatedly, I gave it “\” or path_ i = tif_ Change path + “\” + I to path_ i = tif_ Path + I, you can run normally
for fear of making the same mistake later, just record it

The solution to the flash of. Bat file

Recently, when I was doing a project, I found that the.bat file flashed by after I clicked it. I believe that many friends have also encountered the same problem
The following methods:
First, hold down the Shift key in the folder where your.bat file is located and click the right mouse button. Select “Open PowerShell Window here” as shown in the picture

You’ll get a blue command line window and you’ll type.\ the name of your file at the end of the command line and make sure you add a suffix, like mine
.\make_proto.bat

The above methods are effective, of course, there are other methods, friends can choose.
 
 

There are errors 1304 and 2350 FDI server errors in ArcGIS Server installation

When I was in arcgis server 10.2 installation error 1304 problems, there is a file that cannot be written to, it’s about the (screenshots because before this is from online, looking for pictures)

Retry after 2350 FDI server error error dialog , Retry not, only can abort the
I checked on the Internet, many of them say system and uninstall the residual, But I just reinstalled the system, so there is no such problem.
later want to isn't me what is the problem of system, because when I right click the computer check management no local users and groups this option, wanted to take the computer in the past let the technician to look at, but a variety of reasons not to

later in my free time and want to try to install again, is suddenly thought of, because of the hard drive because before
because I added a solid-state drives to reinstall the system, when I install the arcgis is according to the previous habit before in mechanical drive, There was no problem when installing arcgis desktop, and then I did not think so much when installing the server. I installed it directly in the mechanical hard disk, and the result was wrong
. This time I installed it in the solid state hard disk, which is the system disk, and the installation went smoothly without any problem.
because I found that error 2350 FDI server error might be installed by the administrator without permission, but it did not work, so I suddenly thought about whether it was because the mechanical hard disk was not the system disk, and it was indeed the problem.
arcgis server can only be installed in the system disk because it needs the account permission of the system

Windows encountered 1152 when installing software: error extracting files to the temporary location

Today met 1152: when installing the software Error extracting files to the temporary location Error. There are not too many relevant methods on Baidu. After solving the problem, I will sort out the methods to solve the problem. Hope to be of help to a friend who has the same problem.

if some “bad” temporary files are extracted from previous failed installations, the error of extracting the files to a temporary location usually occurs. Clean that folder and try again is the right way. This means that if you unzip a file into the same folder over and over again, it could cause problems, or corrupted files in the Windows temporary folder could be the problem. What you can do is :
1. Clear Windows temporary folder
2. Clear extract folder or use other location
3. Check folder permissions
4. Clear failed boot of program installation.
First, clear the Windows temporary folder

Windows provides a built-in tool to clean up temporary storage. You can use it to remove all bad or corrupted files that could have prevented the extraction of these files. Any installer can use the Windows temporary folder, so you’ll find lots of files in that location. Storage sense will clear other folders along with a temporary folder, but you can choose which one to clear last.
enter setting > System & gt; Storage & gt; Configure storage awareness or run immediately. If your storage space is low, this tool will also fix the problem.
can delete everything in the Windows temporary folder directly, but if any files are locked, they will not be deleted. Storage sense or disk cleanup tool or any other garbage file cleanup application will ensure that the problem is overridden.
Clear the extract folder or use another location
If you are unzipping the ZIP file into another folder and are receiving the same error, it is best to delete everything in it. Sometimes damage can result if the previous installation is not completed. You can also use different locations to extract the file and see if it works.
if it is possible that the temporary file location already has a bad copy from a previous installation, it is a good idea to redownload the program and try it.
Three, check the folder permissions

you will not be able to extract files into this folder when you temporarily lose access to it. If for some reason you lose access to the folder you are unzipping, it will fail. So here’s what you should do :
• right-click folder > Property
• switch to the Security TAB and check if you are listed under the user group. Select your username and check to see if you have read, write, and execute permissions.
• click the edit button, suggest removing all permissions, and then add again. It will make sure you get the right permissions in the end.
once completed, manually copy the file to the folder and delete the file to check if it is working.
Four, clear the program installation failed boot
If all else fails, the last resort is to use a clean boat. If the problem is caused by something other than storage space or a corrupted temporary file, it will be fixed here.

Adding a reference in the system-user.dtsi file cannot modify the device tree file pl.dtsi

Project Scenario:
when creating a petalinux system using Xilinx’s petalinux tool, modify the device tree file pl.dtsi by adding a reference to the system-user.dtsi file


Problem description:
cannot modify pl.dtsi configuration through system-user.dtsi


/include/ "system-conf.dtsi"
/{
};
 
&amba_pl{
    axidma_chrdev: axidma_chrdev@0 {
            compatible = "xlnx,axidma-chrdev";
            dmas = <&axi_dma_0 0 &axi_dma_0 1>;
            dma-names = "tx_channel", "rx_channel";
    };
};
 
&axi_dma_0{
    dma-channel@40400000 {
        xlnx,device-id = <0x0>;
    };
    dma-channel@40400030 {
        xlnx,device-id = <0x1>;
    };
}

Reason analysis:
system-user. Dtsi file format error, space between dma and {!!!


Solutions:
modify the code format, create system.dtb, use the following statement to reverse generate DTS file, found that part of the pl configuration has been successfully modified!

dtc -I dtb -O dts -o system.dts system.dtb

Modified code:


/include/ "system-conf.dtsi"
/{
};
 
&amba_pl {
    axidma_chrdev: axidma_chrdev@0 {
            compatible = "xlnx,axidma-chrdev";
            dmas = <&axi_dma_0 0 &axi_dma_0 1>;
            dma-names = "tx_channel", "rx_channel";
    };
};
 
&axi_dma_0 {
    dma-channel@40400000 {
        xlnx,device-id = <0x0>;
    };
    dma-channel@40400030 {
        xlnx,device-id = <0x1>;
    };
}

Results in system. DTS:

bug-JAVA call SAP function Connect to SAP gateway failed

Problem: com. SAP. Conn. Jco. JCoException: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
Recently, my colleague made a mistake in the following figure when he called SAP system function with Java. Later, my colleague asked for my assistance. I used its code to run the machine and report the same error. Finally, the problem is solved by searching and trying in many ways.
Summarize the processing methods:
1. First, check whether the code has been written and whether the JAR package and DLL file have been added. Ping/Telnet can try to check whether the network is normal.
2, adjust the JDK version, you can use 1.7/1.8 try it;
3, modify the computer user name, not including Chinese, (after the modification, please shut down, and then start, sometimes restart is really unreliable).

Finally, I successfully solved the problem by modifying the computer name, and ran on JDK1.7 and 1.8 without any problem.

Java — one of Apollo configuration centers — Introduction to Apollo

Apollo configuration center

Apollo (Apollo) is a distributed configuration center developed by ctrip framework department. It can centrally manage the configuration of different environments and clusters. After configuration modification, it can be pushed to the application end in real time. Details please refer to the official introduction: https://github.com/ctripcorp/apollo/wiki/Apollo%E9%85%8D%E7%BD%AE%E4%B8%AD%E5%BF%83%E4%BB%8B%E7%BB%8D

Apollo supports four dimensions to manage the key-value format configuration:

  1. application (application)
  2. environment (environment)
  3. cluster (cluster)
  4. namespace (namespace)

    feature

    based on the particularity of configuration, so the Apollo, from the beginning of the design was determined to become a governance configuration publishing platform, currently offers the following features:

    • unified management of different environments, different cluster configuration

      • Apollo provides a unified interface centralized management environment (environment), different cluster (cluster), the configuration of different namespaces (namespace)
      • the same code deployed in different clusters, can have different configurations, such as a zookeeper address such as
      • (namespace) can be easily through the namespace support multiple different applications to share the same configuration, It also allows applications to override Shared configurations
    • configuration changes in real time (hot publish)

      • user after Apollo modified the configuration and released, the client can receive the latest configuration in real time (1 second), and notify the application
    • version release management

      • all configuration releases have a version concept, which makes it easy to support configuration rollback
    • grayscale release

      • supports the grayscale publication of configuration. For example, after clicking the publication, it only takes effect on some application instances. After the observation is ok for a period of time, it will be pushed to all application instances
    • authority management, release audit, operation audit

      • application and configuration management has a sound authority management mechanism, the management of configuration is also divided into two links, editing and publishing, so as to reduce human error
      • all operations have audit logs, can easily track the problem
    • client configuration information monitoring

      • can easily see the configuration used by which instances
      • provide. Java and.net native client

      • provides a native Java and.net client to facilitate application integration
      • supports Spring Placeholder, Annotation, and ConfigurationProperties of Spring Boot to facilitate application use (Spring 3.1.1+ is required)
      • also provides Http interface, Non-java and.net applications can also easily use
    • to provide open platform API

      • Apollo itself provides more perfect unified configuration management interface, support environment and data center configuration management, permissions, process governance features such as
      • though Apollo, for the sake of generality to configuration modifications do not too many restrictions, as long as you comply with the basic format can save
      • in our research, found that for some users, there may be more complex their configuration format, such as XML, json, need to make check in the format
      • if there are some use DAL, Not only have a specific format, but also to input the value of the need to calibrate the rear can save, such as check the database, the user name and password match
      • for such applications, Apollo application support party through an open interface configuration changes in the Apollo and release, and has perfect authorization and access control
      • simple deployment

        • configuration center as a basic service, availability requirements is very high, which requires the Apollo external dependence as far as possible little
        • the only external dependence is MySQL, so deployment is very simple, as long as the installed Java and MySQL can make Apollo run
        • Apollo also provides packaging script, a key can generate all the necessary installation package, and supports custom runtime parameters

          development guide

          once we have a basic understanding of Apollo, we will start its development. Apollo consists of two parts, the client side and the server side. Let’s first describe the server side of Apollo.

          • Apollo server
          • Apollo server is mainly composed of three parts, namely, configservice, adminservice, portal
          • configservice: provides the configuration reading, pushing and other functions, and the service object is Apollo client
          • adminservice: The Service object is Apollo Portal (management interface)
          • Portal: Portal management interface, intuitively view and publish project configuration messages
          • Config Service and Admin Service are multi-instance, stateless deployment. Therefore, we need to register ourselves in Eureka and keep the heartbeat
          • . On top of Eureka, we built a layer of Meta Server to encapsulate Eureka’s Service discovery interface.
          • Client accesses the Meta Server through the domain name to get the Config Service Service list (IP+Port), and then directly accesses the Service through IP+Port. At the same time, load balance will be performed on the Client side, and error retry
          • Portal accesses the Meta Server through the domain name to obtain the list of Admin Service services (IP+Port), and then access the Service directly through IP+Port. Meanwhile, load balance will be performed on the Portal side, and error retry
          • to simplify deployment. We will actually deploy the Config Service, Eureka, and Meta Server logical roles in the same JVM process

          • Eureka Registry

          • it provides a complete Service Registry and Service Discovery implementation, and has also withstood the test of Netflix’s own production environment. It is relatively easy to use

          • 0. At the same time, Spring Cloud also has a set of perfect open source code to integrate Eureka, so it is very convenient to use.

          • . In addition, Eureka also supports startup in the container of our application, that is to say, after our application is launched, it ACTS as Eureka and also serves as a service provider. In this way, the service availability is greatly improved

          • last point is open source, because the code is open source, so it is very easy for us to understand its implementation principle and troubleshooting problems

            Apollo client

          • 0

            1 rely on import convenience, just need to integrate apolloClient

            2
          • 3

            4

            5 client and server maintained a long connection, In this way, the push

            client will pull the latest configuration of the application regularly from the server of Apollo configuration center. The default timing frequency is to pull the latest configuration of the application every 5 minutes. After the client gets the latest configuration of the application from the server of Apollo configuration center, The client caches the configuration obtained from the server in the local file system a

          • application gets the latest configuration and subscription configuration update notification from the Apollo client

          0