Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

portalocker issue #832

Closed
ilvalle opened this issue Mar 4, 2015 · 5 comments
Closed

portalocker issue #832

ilvalle opened this issue Mar 4, 2015 · 5 comments

Comments

@ilvalle
Copy link
Contributor

ilvalle commented Mar 4, 2015

The pip version of portalocker (0.5.4 on windows) raises an issue on welcome app:

AttributeError: 'module' object has no attribute 'LockedFile'
@niphlod
Copy link
Member

niphlod commented Mar 4, 2015

seems that there are issues with that version that are yet unresolved. and some comments explicitely call @mdipierro to an action :P wolph/portalocker#2

@ilvalle
Copy link
Contributor Author

ilvalle commented Mar 8, 2015

I'd propose to always import the contrib version of portalocker until a new contrib version (inline with the pip version) is provided.
btw: the import in web2py are weird: there are already a few from gluon.portalocker and then few import portalocker

@niphlod
Copy link
Member

niphlod commented Mar 8, 2015

sadly, it's nothing new. web2py imports should always be used with gluon as the base, but up until now those kind of issues are not surfacing because web2py prepends the gluon path to sys.path. To be fair, this means that even if you have a pip-installed version of portalocker, inside web2py when you do "import portalocker" you're loading the gluon/portalocker.py one.

@ilvalle
Copy link
Contributor Author

ilvalle commented Mar 8, 2015

It seems that isn't like that for pydal imports.
I've tested and on both windows/linux, welcome app started only when I
removed the pip version of portalocker
By switching these imports
https://github.com/web2py/pydal/blob/master/pydal/_load.py#L12 it worked as
expected

Paolo

2015-03-08 13:36 GMT+01:00 niphlod notifications@github.com:

sadly, it's nothing new. web2py imports should always be used with
gluon as the base, but up until now those kind of issues are not surfacing
because web2py prepends the gluon path to sys.path. To be fair, this means
that even if you have a pip-installed version of portalocker, inside web2py
when you do "import portalocker" you're loading the gluon/portalocker.py
one.


Reply to this email directly or view it on GitHub
#832 (comment).

@niphlod
Copy link
Member

niphlod commented Mar 8, 2015

that's because - fortunately - pydal doesn't manipulate sys.path. I think at this point it's more of a pydal issue than a web2py one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants