Category Archives: How to Fix

A server error occurred. Please contact the administrator.

In terms of Django site management, login to site Admin, if there is a problem with a title, it could be for the following reasons:
1, localization, letter case didn’t pay attention to, the right is LANGUAGE_CODE = 'useful - Hans' and TIME_ZONE =' Asia/Shanghai ', then analysis is setting up the contents of the file has been changed after cannot be interpreter identification, so later met the same problem can according to this train of thought analysis (then if new create a project to try again, or if the original error, Maybe the previous project wasn't closed). 2. Without the model migration, the data table of the project will not be generated, and the login site is the operation of the data table, without the migration even without the table, how can you log into the site?

Oracle database error: fatal Ni connect error 12170

Fatal NI connect error 12170

VERSION INFORMATION:
TNS for Linux: VERSION 11.2.0.1.0 – Production
Oracle Bequeath NT Protocol Adapter for Linux: VERSION 11.2.0.1.0 – Production
TCP/IP NT Protocol Adapter for Linux: VERSION 11.2.0.1.0 – Production
TCP/IP NT Adapter for Linux:
Tracing not turned on.
Tns error struct:
ns main err code: 12535
TNS-12535: TNS:operation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 110
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=xxx.xxx.xxx.xxx)(PORT=33358))
The reason:
According to the online search, the session is in idle state because the client has not executed a statement for a period of time after connecting to Oracle, which is easy to be cut off by the network layer device. In Oracle 11GR2, due to the opening of ADR (Automatic Diagnostic Repository), this error is written into the alert log.
Solutions:
1. Close the ADR

在sqlnet.ora Added parameters.
DIAG_ADR_ENABLED=OFF

在listener.oraAdd an argument to the following (where <listenername> is replaced with your own listener name).
 DIAG_ADR_ENABLED_<listenername>=OFF

2. Oracle actively sends the probe package to the client

在sqlnet.ora Added parameters.
sqlnet.expire_time=10  ## Probe packets are sent to clients every 10 minutes, with a slight impact on network performance

3. Restart listening after adding parameters

lsnrctl stop
lsnrctl start
or
lsnrctl reload

 

Error: more than one row returned by a subquery used as an expression

Reason for error: There are multiple pieces of data with ID =1, but the code USES a single value to receive it.
Case study: Query the user whose age is 1. There are a lot of users in the database whose age is 1, but the code is received with an int, which causes this error to occur

dao: public int get(int age);
xml:
<select id = “get” resultType=“java.lang.Integer”>
	select age from user where age = 1;
</select>

The correct code is:

dao: public List<Integer> get(int age);
xml:
<select id = “get” resultType=“java.lang.Integer”>
	select age from user where age = 1;
</select>

Undefined control sequence

The program was compiled with the following error,

! Undefined control sequence.
l.64 ...p(- \frac{E_j - E_i}{k_B T}) & \quad \text
                                                  {:  E_j > E_i}\\
?
! Undefined control sequence.
l.65     1 & \quad \text
                        {:  E_j<E_i}\\
?

Search for information on the Internet

The main reason is that \text is not found and you just need to add the relevant package, for example, \ Text in this example needs to add ams Math Package.

error: no such device: xxx xxx Entering rescue mode… grub rescue >

[update time: 2017/5/18]
I. Purpose of this paper:
I these days in the installation of dual systems, Win7 + Ubuntu, Linux and system layer is not very familiar with me, and indeed encountered a lot of problems. This paper is mainly aimed at the “system boot” aspects of the problem to do some sorting. This article provides an approach to system boot. Specific problems are described as follows:
1. The original system of my PC is Win7 system, and then I want to install an Ubuntu system.
2. The process of installing the system is arranged in another blog, please refer to here for details.
3, problem, case 1: after I install the system and restart, but the system directly into the original Windows 7 system, and there are no choice system interface (GRUB is start the implementation specification, which allows a user can have multiple operating systems at the same time inside a computer, in the startup of computer, want to run the operating system).
4. Case II: I made a similar mistake in another situation, and the solution I used was similar, so I put it together. The situation is described as follows: in the case of successful installation of two systems, I entered the win7 system disk management, and then the Ubuntu system related to the deletion of the disk, equivalent to the deletion of the formatting of the Ubuntu system. The problem comes, restart the computer, can not enter the win7 system, the following interface appears :(because of the previous operation, the system boot file has been deleted).

2. Solution:
1. Plug in the USB drive that has been successfully burned into the system, then choose to try Ubuntu and enter the Ubuntu system interface. (The item without UEFI was selected for this article)
2. Make sure the machine is connected to the Internet, open the terminal and enter the following command:

sudo -i
add-apt-repository ppa:yannubuntu/boot-repair && apt-get update
apt-get install -y boot-repair && boot-repair

The first line indicates entering root account mode.
line 2 adds the software source and updates the system.
third action install boot-repair and start the software after the installation is complete.

3. Input relevant instructions according to prompts. Part of the process diagram is shown below.


4, restart the computer, if successful, the system boot interface has come out, you can choose the required system.

3. Reference materials for this paper
1, use the Boot – repair repair double system: http://jingyan.baidu.com/article/5553fa82cd48a765a23934ae.html?qq-pf-to=pcqq.c2c

ABAQUS open error: FlexNet licensing error:-97 ,121 or -96,491

Abaqus Opening error: FLEXNET LICENSING Error :-97,121 or -96,491
(1) the system firewall problem, after closing the system firewall, you can open
and first run the lmgrd.exe in the license folder, there is no change; Run again lmreread. Exe, and then restart it
3. FLEXnet Licensing Error Codes – https://blog.csdn.net/baidu_18607183/article/details/51319104
REFERENCE [1]:https://blog.csdn.net/baidu_18607183/article/details/51319104

Error loading pscopg2 module: no module named pscopg2

When using Django to connect to a postgresql database, use python manager.py migrate to create a database.
django. Core. Exceptions. ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2' solution:
apt install psycopg2 if it fails, don't care if apt install libpq-dev or apt install postgresql-server-dev-x.y must be installed successfully, one of them PIP install psycopg2 must be installed successfully. Finally, remember to set an access password for the database set in your setting. Py , otherwise an error will be reported. You can set the access password by referring to the relevant commands here.

Python memoryerror (initializing a large matrix)

Encountered this problem is to initialize a large matrix:

import numpy as np
init_a = np.zeros((10000*10000,4096))

Direct initialization like this prompts a MemoryError.
Looking up the data, it finds that the default dtype=float64; therefore, after modifying the data type as float16, the error is avoided. Although the accuracy is lost, the code runs successfully:

init_a =  np.zeros((10000*10000,4096),dtype='float16')

If there is a better solution, please advise ~

boot.asm:1:error:parser:instruction expected

org 07c00h ; P
mov ax, cs
mov ds, ax
mov es, ax
call STR; Call display string routine
JMP $;
> BBSTR :
mov ax, BootMessage
mov bp, ax; ES:BP = string address
mov cx, 16; CX = string length
mov ax, 01301h; AH = 13, AL = 01h
mov bx, 000ch; BL = 0Ch, highlighted)
mov dl, 0
int 10h; BootMessage: db “Hello, OS world!” BootMessage: db “Hello, OS world!
times 510-($-$$) db 0 ; Fill the remaining space so that the generated binary code is exactly 512 bytes
dw 0xaa55; End flag

To compile into an executable program under Linux, use the command:
Nasm-f ELF pmboot.asm -o pmboot.bin

Compiler error:

The boot. The asm: 1: error: parser: instruction is expected

Use the command nasm pmboot.asm -o pmboot.bin without error.

LDAP: error code 21 – objectclass: value ා 0 invalid per syntax

The root cause is that the ObjectClass for manipulating data in LDAP is the same as in the original LDAP when adding, deleting, or altering it.
First, inconsistent ObjectClass type causes the reason for the addition failure
Entry, which is a directory managed object, is the most basic particle in LDAP. Generally, the addition, deletion, change, and retrieval of LDAP are based on entries. Each entry can have many attributes. An ObjectClass (ObjectClass) is a collection of properties.
Object classes make it easy to define entry types. Each entry can inherit directly from multiple object classes, thus inheriting various properties. If two object classes have the same property, only one property will be retained after the entry is inherited. The object class also specifies which attributes are essential information and Must or Required: which attributes are extensibility information and May or Optional.
Each Entry in the LDAP directory tree must belong to its own conditional objectClass, objectClass, then define its Entry attributes and corresponding values, and objectClass corresponds to Java as class. In Java, Class can be roughly divided into Abstract and Concrete, and only concrete Class can generate instance. In LDAP, objectClass is divided into three classes: Abstract, Structural, and Auxiliary. The specific definition is as follows:
Abstract object classes are only intended to be extended by other object classes. An entry must not contain any abstract classes unless it also contains a structure or helper class from which Dervies derive an abstract class (that is, including non-abstract object classes, an inheritance chain of abstract classes). All entries must contain at least a “top” abstract object class and their structural classes in the inheritance chain. They may or may not contain other abstract classes in the inheritance chain in the structural class or in any of their helper classes. **Structural: ** Structured object classes are designed to define the key that an item represents. Each entry must contain a structured object class chain, and the root of the chain must ultimately be a “Top” abstract object class. Changes to the entry’s structural object class are not allowed. **Auxiliary: **Auxiliary object classes are intended to define the additional qualities of items. An entry may contain zero or more helper classes, and the set of helper classes associated with an entry may change over time.
The object classes themselves can inherit from each other, so the root of the object class is the top abstract object class. Take access control devices as an example, their inheritance relationship is shown in the figure below:

DAP entry attributes can be added depending on whether the objectClass inherited by the entry contains this attribute. ObjectClass has an inheritance relationship, that is, the attributes added to the entry ultimately depend on the collection of all objectclasses that it inherits.
The objectClass and attributes are specified by the schema file, which is stored in the /etc/openldap/schema directory. The schema file specifies the composition of the objectClass and the corresponding relationships between attributes and values in the directory tree. You can generate the objectClass by defining a schema file to generate the required attributes. The relationships determined before the ObjectClass, AttributeType and Syntax are shown in the figure below:

so if the added property is not in the scope of objectClass, the directory server is not allowed to add the property. To do so, you must add the schema file to produce the properties corresponding to the objectClass.