PCoelho07 / opennero

Automatically exported from code.google.com/p/opennero
Other
0 stars 0 forks source link

error saving file #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.enter training mode
2.deploy rtneat
3.pause
4.save team
5.enter team and save

What is the expected output? What do you see instead?
expected: a new team file
instead: no new team file

What version of the product are you using? On what operating system?
OpenNERO-2011.12.02-win32
windows 7 64bit

Please provide any additional information below.
console message:
2011-Dec-03 14:00:12.570870 (!) Could not open file C:/Users/admin/AppData/Local
/OpenNERO/../../../..C:/team/e00
2011-Dec-03 14:00:12.586470 (M) [python] Traceback (most recent call last):
  File "NERO/main.py", line 17, in ModTick
    NERO.module.parseInput(data.strip())
  File "C:\Users\jonas\Desktop\OpenNERO-2011.12.02-win32\NERO\module.py", line 3
65, in parseInput
    if loc == "save1": mod.save_team(val, constants.OBJECT_TYPE_TEAM_0)
  File "C:\Users\jonas\Desktop\OpenNERO-2011.12.02-win32\NERO\module.py", line 1
62, in save_team
    with open(str(location), 'a') as handle:
IOError: [Errno 22] invalid mode ('a') or filename: '..\\..\\..\\..C:\\team\\e00
'

Original issue reported on code.google.com by boxnumbe...@gmail.com on 3 Dec 2011 at 7:05

GoogleCodeExporter commented 9 years ago
r1522 should address this issue - you can fix existing downloads by replacing 
NERO/module.py with the new version. Thanks for reporting this.

Original comment by ikarpov on 3 Dec 2011 at 8:46

GoogleCodeExporter commented 9 years ago
I replaced module.py.  Now when I select Nero Training and Start, the entire 
window is purple with the white counter in the upper right.  Nothing else is 
rendered.

Original comment by boxnumbe...@gmail.com on 3 Dec 2011 at 9:30

GoogleCodeExporter commented 9 years ago
Check that you didn't get some characters added or missing on
accident... Or, just try the new binary.

Original comment by ikarpov on 3 Dec 2011 at 9:51

GoogleCodeExporter commented 9 years ago
I installed the new binary.  Now the training session is rendered properly.  
When I go through the steps to save, a new file does get created.  However, the 
file is empty, and the console prints this error:

2011-Dec-03 16:59:58.048188 (!) Could not open file C:/Users/jonas/AppData/Local
/OpenNERO/../teams/test.txt

The odd thing is this is the wrong path.  I was saving to 
c:/users/jonas/desktop/teams/test.txt.

Original comment by boxnumbe...@gmail.com on 3 Dec 2011 at 10:12

GoogleCodeExporter commented 9 years ago
That's pretty strange... I will look into this. You are running on
Windows 7, 32-bit, correct?

Original comment by ikarpov on 4 Dec 2011 at 3:13

GoogleCodeExporter commented 9 years ago
My os is windows 7 64-bit.
But I'm running 32-bit python, wxpython, and opennero.

Original comment by boxnumbe...@gmail.com on 4 Dec 2011 at 3:33

GoogleCodeExporter commented 9 years ago
Issue 118 has been merged into this issue.

Original comment by ikarpov on 4 Dec 2011 at 5:07

GoogleCodeExporter commented 9 years ago
it looks like this is still not quite fixed. working on it...

Original comment by ikarpov on 4 Dec 2011 at 5:11

GoogleCodeExporter commented 9 years ago

Original comment by ikarpov on 4 Dec 2011 at 5:12

GoogleCodeExporter commented 9 years ago
BTW, it seems that when you are able to save your teams with current binary and 
they form empty files where you tried to save them, they may actually still be 
saved but located in Local Settings\OpenNERO instead... So while we are working 
on a solution, try checking there if you are looking for the lost populations.

Original comment by ikarpov on 4 Dec 2011 at 5:16

GoogleCodeExporter commented 9 years ago
No such luck.  

From the error message it looks like there is a relative path ".." stuck inside 
the absolute path.  Here is the error:

Could not open file C:/Users/jonas/AppData/Local/OpenNERO/../teams/test2.txt

Original comment by boxnumbe...@gmail.com on 4 Dec 2011 at 5:24

GoogleCodeExporter commented 9 years ago
I am getting the empty files when I save. 

For Windows Vista, I found the files with data at 
C:\Users\{user_name}\AppData\[file_name]

Original comment by eriktash...@hotmail.com on 4 Dec 2011 at 5:30

GoogleCodeExporter commented 9 years ago
Just to be clear, I too am able to produce an empty file.  It gets created 
where I specify (c:\users\jonas\desktop\teams\test2.txt).  So, that part works. 

Original comment by boxnumbe...@gmail.com on 4 Dec 2011 at 5:39

GoogleCodeExporter commented 9 years ago
Right, please check the same location where OpenNeroLogs are located for your 
lost population files. The problem is that rtNEAT part gets saved in one 
location and the RL part (empty in rtNEAT case) gets saved in another. Either 
way, there is a fix coming... Hold on =).

Original comment by ikarpov on 4 Dec 2011 at 5:55

GoogleCodeExporter commented 9 years ago
r1527 looks like it fixed this issue - please reply here if this wasn't the 
case for you.

The new binary which includes r1527 is available (2011.12.04).

Original comment by ikarpov on 4 Dec 2011 at 7:21

GoogleCodeExporter commented 9 years ago
Thank you for fixing this issue.  I watched the videos and read the docs
but I still don't understand the training process.  Is there a forum to ask
such questions?

Original comment by boxnumbe...@gmail.com on 7 Dec 2011 at 4:36

GoogleCodeExporter commented 9 years ago
Yes, that forum is http://groups.google.com/group/opennero =).

Original comment by ikarpov on 7 Dec 2011 at 1:02

GoogleCodeExporter commented 9 years ago
Issue 130 has been merged into this issue.

Original comment by ikarpov on 7 Dec 2011 at 6:58

GoogleCodeExporter commented 9 years ago
Ok. I have done this. I copied the new version of module.py

I opened the old version using Python IDE.

Then I replaced it with the new version.

Then I saved it. Then I clicked on the "Run" module option.

I got the following error.

>>> ================================ RESTART ================================
>>> 

Traceback (most recent call last):
  File "C:\Users\pHOeNIx\Downloads\Compressed\OpenNERO-2011.12.02-win32\NERO\module.py", line 8, in <module>
    import common
ImportError: No module named common
>>> 

Please advise

Original comment by karanjth...@gmail.com on 7 Dec 2011 at 7:12

GoogleCodeExporter commented 9 years ago
The easiest thing to do is to just download the new release - it will have all 
the fixes so far.

As for your error, it looks like you are trying to run module.py separately. 
It's really not what it's for - you have to start OpenNERO and then select the 
NERO Training mod.

Original comment by ikarpov on 7 Dec 2011 at 7:19

GoogleCodeExporter commented 9 years ago
Works like a charm(till now)

Thank you for the prompt reply

Original comment by karanjth...@gmail.com on 7 Dec 2011 at 7:29