Closed GoogleCodeExporter closed 8 years ago
Hello Valencia,
I think that the problem comes from the with statement which is a future
feature of
Python 2.5. Sorry for that. HMI is still a dev in progress and was not fully
tested
with Python 2.5. (I'm developping with Python 2.6)
Try to add the following line on top of the master_webhmi.py
from __future__ import with_statement
let me know if it fixes the problem.
Best Regards
luc
Original comment by luc.jean@gmail.com
on 16 Apr 2010 at 1:10
hi luc. Yes, it worked.
I think I have to move to python 2.6 to continue testing because now I have
another
error:
$ python master_webhmi.py Traceback (most recent call last):
File "master_webhmi.py", line 123, in <module>
APP = App()
File "master_webhmi.py", line 108, in __init__
self._db = Persistence()
File "master_webhmi.py", line 46, in __init__
with self._get.db() as conn:
AttributeError: Persistence instance has no attribute '_get'
I'm also very interested in your comment about Django. Maybe very useful to me.
I
will follow your advances.
Thanks.
Original comment by vicn...@gmail.com
on 16 Apr 2010 at 1:43
Did you try to modify the code because it should be:
with self._get_db() as conn: and not _get.db()
It may be the cause of the error.
I am working a lot with Django and I like it very much. Unfortunately, this
part of
the project is still in my head and I shouldn't be able to work on it in the
coming
weeks.
What kind of projects do tou want to do? Push some data into a database on the
internet?
Best Regards
Original comment by luc.jean@gmail.com
on 16 Apr 2010 at 2:02
I've committed the fix on rev 108
Can you please update your code and tell me if it works ok now?
Best Regards
Original comment by luc.jean@gmail.com
on 16 Apr 2010 at 2:09
Oups! forgot to change the status of this issue :)
Original comment by luc.jean@gmail.com
on 16 Apr 2010 at 2:10
Hi luc.
Testing r108 in my 2.5.2 Python system now I have this AttributeError:
$ python master_webhmi.py
Traceback (most recent call last):
File "master_webhmi.py", line 123, in <module>
APP = App()
File "master_webhmi.py", line 108, in __init__
self._db = Persistence()
File "master_webhmi.py", line 46, in __init__
with self._get_db() as conn:
AttributeError: 'sqlite3.Connection' object has no attribute '__exit__'
(It works fine in Ubuntu 9.10 with Python 2.6)
Original comment by vicn...@gmail.com
on 17 Apr 2010 at 6:49
Original issue reported on code.google.com by
vicn...@gmail.com
on 16 Apr 2010 at 12:56