Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Open cv 2.4 - opencv_java build error - gen_java.py

Cmake reports under build: class % (%s) is duplicated" %\

This is an Python / Java issue for the developers.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates line 813 in said file to be the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

Open cv 2.4 - opencv_java build error - gen_java.py

Cmake reports under build: class % (%s) is duplicated" %\

This is an Python / Java issue for the developers.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates in line 813 in said file to be the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

Open cv 2.4 - opencv_java build error - gen_java.py

Cmake reports under build: class % (%s) is duplicated" %\

This is an Python / Java issue for the developers.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates in line 813 in said file to be the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

Open cv 2.4 - opencv_java build error - gen_java.py

Cmake reports under build: class % (%s) is duplicated" %\

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates in that line 813 in said file to be the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

Open cv 2.4 - opencv_java build error - gen_java.py

Cmake Visual Studio reports under build: build of open cv: class % (%s) is duplicated" %\

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates that line 813 in said file to be the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

Open cv 2.4 - opencv_java build error - gen_java.py

Visual Studio reports under build of open cv: class % (%s) is duplicated" %\%\ and says there's an syntax error.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates that line 813 in said file to be the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

Open cv 2.4 - opencv_java build error - gen_java.py

Visual Studio reports under build of open cv: class % (%s) is duplicated" %\ and says there's an syntax error.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates that line 813 in said file to be is the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

Open cv 2.4 - opencv_java build error - gen_java.py

Visual Studio reports under build of open cv: class % (%s) is duplicated" %\ and says there's an syntax error.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates that line 813 in said file is the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

the same file in Opencv 3.1.0 in same class, line 959 (I'm using notepad++) reads: Def add_class(self, decl): ... self.classes[name] = classinfo if name in type dict: logging.warning('duplicated: %s' , classinfo) return...

Open cv 2.4 - opencv_java build error - gen_java.py

Visual Studio reports under build of open cv: class % (%s) is duplicated" %\ and says there's an syntax error.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates that line 813 in said file is the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

the same file in Opencv 3.1.0 in same class, line 959 (I'm using notepad++) reads: reads:

Def add_class(self, decl): ... self.classes[name] = classinfo if name in type dict: logging.warning('duplicated: %s' , classinfo) return...

Open cv 2.4 - opencv_java build error - gen_java.py

Visual Studio reports under build of open cv: class % (%s) is duplicated" %\ and says there's an syntax error.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates that line 813 in said file is the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

the same file in Opencv 3.1.0 in same class, line 959 (I'm using notepad++) reads:

Def add_class(self, decl): ... ...

self.classes[name] = classinfo if name in type dict: logging.warning('duplicated: %s' , classinfo) return...

Open cv 2.4 - opencv_java build error - gen_java.py

Visual Studio reports under build of open cv: class % (%s) is duplicated" %\ and says there's an syntax error.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates that line 813 in said file is the culprit. Line 813 reads:

Def add_class(self, decl): classinfo = Classinfo(decl) if classinfo.name in class_ignore_list: return name = classinfo.name if name in self.classes: print "Generator error: class %s (%s) is duplicated" %\ (name, classinfo.cname) Return....

the same file in Opencv 3.1.0 in same class, line 959 (I'm using notepad++) reads:

Def add_class(self, decl): ...

self.classes[name] = classinfo classinfo

if name in type dict: dict:

logging.warning('duplicated: %s' , classinfo) classinfo)

return...

Open cv 2.4 - opencv_java build error - gen_java.py

Visual Studio reports under build of open cv: class % (%s) is duplicated" %\ and says there's an syntax error.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates that line 813 in said file is the culprit. Line 813 reads:

Def add_class(self, decl): decl):

classinfo = Classinfo(decl) Classinfo(decl)

if classinfo.name in class_ignore_list: return class_ignore_list:

return

name = classinfo.name classinfo.name

if name in self.classes: self.classes:

print "Generator error: class %s (%s) is duplicated" %\ %\

(name, classinfo.cname) classinfo.cname)

Return....

the same file in Opencv 3.1.0 in same class, line 959 (I'm using notepad++) reads:

Def add_class(self, decl): ...

self.classes[name] = classinfo

if name in type dict:

logging.warning('duplicated: %s' , classinfo)

return...

Open cv 2.4 - opencv_java build error - gen_java.py

Visual Studio reports under build of open cv: class % (%s) is duplicated" %\ and says there's an syntax error.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates that line 813 in said file is the culprit. Line 813 reads:

Def add_class(self, decl):

classinfo = Classinfo(decl)

if classinfo.name in class_ignore_list:

return

name = classinfo.name

if name in self.classes:

print "Generator error: class %s (%s) is duplicated" %\

(name, classinfo.cname)

Return....

the same file in Opencv 3.1.0 in same class, line 959 (I'm using notepad++) reads:

Def add_class(self, decl): ...

self.classes[name] = classinfo

if name in type dict:

logging.warning('duplicated: %s' , classinfo)

return...

By editing the file gen_java.py at line 813 and line 814 by moving the % BEHIND the new line separator, the error message went away and the script ran.

Open cv 2.4 - opencv_java build error - gen_java.py

Visual Studio reports under build of open cv: class % (%s) is duplicated" %\ and says there's an syntax error.

The error pertains to the file gen_java.py in \opencv\modules\java\generator\

The error message indicates that line 813 in said file is the culprit. Line 813 reads:

Def add_class(self, decl):

classinfo = Classinfo(decl)

if classinfo.name in class_ignore_list:

return

name = classinfo.name

if name in self.classes:

print "Generator error: class %s (%s) is duplicated" %\

(name, classinfo.cname)

Return....

the same file in Opencv 3.1.0 in same class, line 959 (I'm using notepad++) reads:

Def add_class(self, decl): ...

self.classes[name] = classinfo

if name in type dict:

logging.warning('duplicated: %s' , classinfo)

return...

By editing the file gen_java.py at line 813 and line 814 by moving the % BEHIND the new line separator, the error message went away and the script ran.Apparantly calls to the print method in Python needs to be enclosed in parethesis thusly: print("some msg"). Original code called print only by: " some msg". It created the error messages.