-
Notifications
You must be signed in to change notification settings - Fork 693
ImportError: No module named moves.urllib.parse #1022
Comments
You currently need to use |
Thanks for the prompt reply, Nicolas. Indeed, I am using:
and
I believe that is my current setup. I had to purposely set PY3, and the message about python 2 disappeared, but the error would still persist. I can certainly double check and report back tomorrow; I do not have access to the build system at the moment. |
Earlier today I had the same error as #842 locally (python3 syntax), and I had to update our host environment to run PY2, with py_test runtimes set to PY3 for our code. That's what made me think that container_push should also work with the PY2 host, as you confirmed. However, I am getting the error. Building the image does work locally. |
we dont set the incompatible_py3_is_default=false flag in our builds, can you try without that flag? |
Tried all combinations, with no luck:
I am setting those params in .bazelrc, and they do seem to have some effect.
|
Let me try destroying the cache. |
Same error. Maybe related to #55 ?
|
@nlopezgi This suggests suggest that it should be renamed to Other than porting to PY2, which I already did when we started using docker_rules, I have no ideas at the moment on how to fix the six issue, so if anyone can give me a hint, I would appreciate it. Otherwise plan B is to push docker images to the registry as a separate build step. Thanks. |
|
I was finally able to make it work by manually editing:
required by
required by As noticed above, the symlink does not work for
The manual fix is to copy (or link) Now I need to investigate how those symlinks are generated. Is that part of the bazel sandboxing process? |
I am in an identical situation, depending on some other libraries that use six (though I am exclusively using python 2.7 at this point), and I suspect that copy from six.py to init.py in the genrule is getting clobbered because six is an existing dependency. A manual copy that you suggest fixes this for me as well. |
@laurit17 After trying several fixes for containerregistry and rules_docker, I just found the easiest workaround. At the top of the
That seems to have fixed it for me. |
The workaround is a copy of: |
ugh, this seems to be a diamond dependency problem, which are not really easy to track down or resolve. Alternatively, you can try to make sure the call to |
Can confirm that adding:
or
to the top of our WORKSPACE also works. |
@nlopezgi It would be great to add that piece of info as a "known issue" to the readme. I had read about the diamond dependencies, but given the PY2 vs PY3 changes as well, it took a while to figure out what it was. Might save people some time. Will prepare a PR. |
@raulAtNines that would be awesome, thanks! |
@nlopezgi Saw your approval, will sign the CLA shortly. |
For context, issue related to: |
I'm having a similar issue and the order of WORKSPACE dependencies seems to have no effect. My import error is slightly different. Not sure what is the issue here. Bazel 0.28.0. |
Nevermind, had to clear the cache and/or disable remote caching... |
docs have been updated to reflect details about this issue. Closing. |
Hi,
I am trying to publish a java image from our bazel 0.28.1 build. I can build the image locally without issues with
bazel run mytarget
. However, when I try to publish the image withcontainer_push
, I run into an issue with six:Earlier today I got the environment to work with PY2, which I think is required here. However, I tried with PY3 and the issue was similar:
Except the PY3 message goes away.
Any hints on how to work around this? Is this something for containerregistry to fix?
Thanks,
Raul.
The text was updated successfully, but these errors were encountered: