web2py™ Version 2.9.12-stable+timestamp.2015.01.17.06.11.03 Python Python 2.7.9: D:\programs\open\python27\python.exe (prefix: D:\programs\open\python27)
Traceback (most recent call last):
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\gluon\restricted.py", line 224, in restricted
exec ccode in environment
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\applications\my_app\views\default/index.html", line 149, in <module>
File "applications\my_app\modules\userdata.py", line 177, in get_cities_filter
update_cities_filter()
File "applications\my_app\modules\userdata.py", line 286, in update_cities_filter
filter_rows = _get_cities_filter_from_db()
File "applications\my_app\modules\userdata.py", line 340, in _get_cities_filter_from_db
return db(db.institute.id > 0).select(db.institute.permanent_city_or_town, distinct=True, **cache_settings)
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\gluon\dal\objects.py", line 2066, in select
return adapter.select(self.query,fields,attributes)
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\gluon\dal\adapters\base.py", line 1230, in select
time_expire)
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\gluon\cache.py", line 417, in __call__
self.storage[key] = (now, value)
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\gluon\cache.py", line 324, in __setitem__
self.replace(tmp_path, fullfilename)
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\gluon\cache.py", line 286, in replace_windows
os.rename(src, dst)
WindowsError: [Error 3] The system cannot find the path specified
def replace_windows(src, dst):
if not ReplaceFile(dst, src, None, 0, 0, 0):
os.rename(src, dst) <--- this code is highlighted as the point where error is throw
Variables
src r'C:\Users\subbaraman\Downloads\web2py_src_001\web2py\applications\my_app\cache\tmpkjuyyo'
dst r'C:\Users\subbaraman\Downloads\web2py_src_001\web...FEBLUQRKSIUQCQ2LOON2GS5DVORSS42LEEA7CAMBJHM======'
os.rename <built-in function rename>
global os <module 'os' from 'D:\programs\open\python27\lib\os.pyc'>
<type 'exceptions.WindowsError'> [Error 5] Access is denied: 'C:/Users/subbaraman/Downloads/web2py_src_001/web2py/applications/cache2912_issue/cache/092'
Version
web2py™ Version 2.9.12-stable+timestamp.2015.01.17.06.11.03
Python Python 2.7.9: D:\programs\open\python27\python.exe (prefix: D:\programs\open\python27)
Traceback
Traceback (most recent call last):
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\gluon\restricted.py", line 224, in restricted
exec ccode in environment
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\applications\admin\controllers/default.py", line 1945, in <module>
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\gluon\globals.py", line 393, in <lambda>
self._caller = lambda f: f()
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\applications\admin\controllers/default.py", line 448, in cleanup
clean = app_cleanup(app, request)
File "C:\Users\subbaraman\Downloads\web2py_src_001\web2py\gluon\admin.py", line 124, in app_cleanup
if f[:1] != '.': os.unlink(os.path.join(path, f))
WindowsError: [Error 5] Access is denied: 'C:/Users/subbaraman/Downloads/web2py_src_001/web2py/applications/cache2912_issue/cache/092'
________________________________________ Kiran Subbaraman http://subbaraman.wordpress.com/about/
Humm that test application gave no error for me. Are you sure you cleared everything in the cache folder before upgrading?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
________________________________________ Kiran Subbaraman http://subbaraman.wordpress.com/about/
You did spot a bug in admin has that needs to be changed from os.unlink to recursive_unlink I will make a pull request with the fix.
However, manually deleting the cache folder should have solved your problem. I will keep trying to reproduce your problem as it's hard to solve it if I can't.
def replace_windows(src, dst):
windows_prefix = "\\\\?\\"
if not ReplaceFile(windows_prefix+dst, windows_prefix+src, None, 0, 0, 0):
os.rename(windows_prefix+src, windows_prefix+dst)
You did spot a bug in admin as that needs to be changed from os.unlink to recursive_unlink I will make a pull request with the fix.
This is the reason why I decided to add the key prefix code
only in the replace* method, and nowhere else.
I tested this locally (manually testing with my sample app), to
see if the cache contents are retrieved correctly. And then used
the http://127.0.0.1:8000/myapp/appadmin/ccache to inspect the
cache, and also remove keys from it. It seemed to work fine.
Am I missing something?
________________________________________ Kiran Subbaraman http://subbaraman.wordpress.com/about/
Am I missing something?
This prefix does not get added to the file name, when it is stored on the file system.
________________________________________ Kiran Subbaraman http://subbaraman.wordpress.com/about/
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.
Thanks, will do.
Opened an issue to track this to closure: https://code.google.com/p/web2py/issues/detail?id=2035
________________________________________ Kiran Subbaraman http://subbaraman.wordpress.com/about/On Tue, 20-01-2015 11:25 PM, Leonel Câmara wrote:
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
________________________________________ Kiran Subbaraman http://subbaraman.wordpress.com/about/
________________________________________ Kiran Subbaraman http://subbaraman.wordpress.com/about/