The exception stack:
morphia model code caused the trouble:
morphia model code that will not cause the trouble:
Root cause: Not found
The exception stack:
morphia model code caused the trouble:
morphia model code that will not cause the trouble:
Root cause: Not found
// the map function var map = function() { var dimension = this[dimension] ? this[dimension] : "_"; var key = this.inst + "|" + this.bar + "|" + dimension; var result = {hit: 1}; emit(key, result); }; // the statement to call mapreduce db.foo.mapReduce(map, reduce, { out: {inline: 1}, query: q, scope: {dimension: "red"}});
dimension
is redefined in the map function. Change the map funciton to the following solves the problem:
// the map function var map = function() { var d= this[dimension] ? this[dimension] : "_"; // changed var key = this.inst + "|" + this.bar + "|" + d; // changed var result = {hit: 1}; emit(key, result); };
Traceback (most recent call last): File "j:\play\play", line 143, in <module> cmdloader.load_play_module(module) File "j:\play\framework\pym\play\cmdloader.py", line 31, in load_play_module if os.path.exists(commands): File "j:\play\python\lib\genericpath.py", line 18, in exists st = os.stat(path) TypeError: stat() argument 1 must be (encoded string without NULL bytes), not strI tried to do
play clean
but it got the same problem. I was very annoyed and even restart the machine, the same result!!!!
genericpath.py
, and it prints out this sequences:
c:\w\_lgl\play-morphia c:\w\_lgl\play-morphia\samples-and-tests\unit-tests\modules j:\play\modules\crud\commands.py K-*╬╠¤│R0È3ÓÕr,J╬╚,K-õñVö▬+└$x╣£ïR‼KRStØ*üz╠¶♀tô♀ì§4éK¾¶|3ôï‗ï+ïKRsï§<¾Æ§4y╣x╣ PK♥♦ ♦ì⌂< META-INF/PK♥♦¶ K½~<♥ yR♠☻ T♠ - net/sf/oval/collection/CollectionFactory.java┼S┴j▄0►=»┴ 0Ã$deoáùñöäðÊʶB↕z▼╦│Â↕Y2Æ╝ï)²¸Äõf‼¿│öÆÂ:YofÌ╝y#↨G»{‗♀ÄÓ┌║á¼± ↔aá\commands.py Traceback (most recent call last): File "j:\play\play", line 143, incmdloader.load_play_module(module) File "j:\play\framework\pym\play\cmdloader.py", line 31, in load_play_module if os.path.exists(commands): File "j:\play\python\lib\genericpath.py", line 19, in exists st = os.stat(path) TypeError: stat() argument 1 must be (encoded string without NULL bytes), not str
[ERROR] c:\w\_lgl\rythm\src\main\java\com\greenlaw110\rythm\utils\S.java:[125,1279] unmappable character for encoding Cp1252The solution is open the pom.xml file and add one line into the maven-compiler-plugin section:
org.apache.maven.plugins maven-compiler-plugin 2.0.2 1.6 UTF-8