Not sure if the behavior of the module is correct in this case,
it seems to be overly strict judging by some of the issues which
can be found online regarding "not a gzipped file" errors. Some
of those quite recent, in fact.
It is possible to disable the involvement of gzip in the process by creating a subclass of Transport and passing it to the constructor of the *you know what* object, as follows:
class MyTransport(themoduleyouneedtouse.Transport):
accept_gzip_encoding = False
TheClassYouNeedToInstantiate(url, transport=MyTransport)
That solves the problem with the requests, but of course is not someone trying to solve the challenge would find easily or think about doing.
I guess the server should be modified to include that missing signature (which might or might not break other versions of Python or other libraries), or just disable gzip for its response.
Hi, just a comment. I had to use a different library to be able to pass the level, because the library that is supposed to be the correct one throws an exception. I'm not sure if it only happens on my machine, so I'd appreciate if someone else could confirm the problem.
In order not to reveal anything about the solution of the level, I will only share the exception.
raise BadGzipFile('Not a gzipped file (%r)' % magic)
--
You received this message because you are subscribed to the Google Groups "Python Challenge" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-challen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-challenge/a1b96c76-7f16-4d7e-bd04-af7e5724dcd3n%40googlegroups.com.