Comments (12)
We're far away from vendoring tooltool (that's the plan)
In the meantime for this bug what I propose we do is:
- fix it here
- copy over the new tooltool.py version in all tooltool.py instances in mozilla-central
- bump the version number in that file, it was never changed I think
from tooltool.
At this point, 3.6 is Old (3.8.1 is already out). I don't think it's worth fixing this unless it's reproducible on 3.7 or 3.8.
from tooltool.
@mozbhearsum you should reopen this bug, it will happen on 3.7 and 3.8 as well.
The bug is that for some reason, the PY3 version is not saving the data using a binary mode. it converts for some reason the data received into text and then writes it into a text file.
But it makes the assumption that the data received can always be decoded in utf8, which is not the case all the time (and the response headers don't always give us a hint and we don't check it anyways)
We should keep the 'wb' mode for py3 too and simply write through the data received as bytes.
I got it working locally, happy to provide a PR is needed.
from tooltool.
This is my quick fix to make it work locally :)
tarek@Tareks-MacBook-Air-3 Downloads % diff tooltool.py.original tooltool.py.mine
63c63
< open_attrs = dict(mode='w', encoding='utf-8')
---
> open_attrs = dict(mode='wb') #, encoding='utf-8')
740,741c740,741
< if PY3:
< indata = to_text(indata)
---
> #if PY3:
> # indata = to_text(indata)
from tooltool.
Okay, let's reopen then :)
from tooltool.
This is blocking a mozproxy enhancement: https://phabricator.services.mozilla.com/D62443
Here is a try example of the error:
https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=289676975&revision=73a706c3397b0ed213c6727f2a347d3e375d6608
from tooltool.
I have a plausible fix for this in #27, although it can't be merged yet due to test failures.
If anyone is up for it, I'd appreciate any additional testing you can do with the new tooltool.py.
from tooltool.
https://lando.services.mozilla.com/D63870/ to import the fix in tree.
from tooltool.
@mozbhearsum looks like the import was backed out can you take a new look pls
from tooltool.
Yeah, sorry about that. I've got that fixed here, and will be updating mozilla-central
again after #28 lands.
In the meantime, feel free to import the current tooltool.py
into try pushes if it helps you.
from tooltool.
#28 is taking a bit longer than I thought. I opened https://phabricator.services.mozilla.com/D65139 to get the python 3 support landed in the meantime.
from tooltool.
This landed on central and stuck this time. Python 3 should work now. Please re-open or open a new issue if it's still problematic.
from tooltool.
Related Issues (16)
- tooltool client location, duplication and usage HOT 1
- frontend is broken HOT 1
- figure out what to do with logins HOT 3
- worker is broken HOT 7
- Update documentation on credentials. HOT 4
- use cloudfront for downloads instead of redirecting directly to s3 HOT 2
- add test to verify that in-tree tooltool.py copies match this one HOT 1
- synchronize version.txt and __version__ in the client
- frontend is busted HOT 1
- Update the README to indicate when tooltool should (or shouldn't) be used
- tox not running on pull request HOT 1
- file size limited to 2gb HOT 1
- TypeError: common_error_handler() missing 1 required positional argument: 'exception' HOT 1
- TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str. HOT 2
- ValueError: A string literal cannot contain NUL (0x00) characters.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tooltool.