al45tair / vat

Useful Python VAT code
Other
3 stars 3 forks source link

Access Denied error #1

Open WilliamMayor opened 6 years ago

WilliamMayor commented 6 years ago

Hi, I think this might be the same error as you mentioned in a BitBucket issue, but I thought I'd raise it here too.

I'm getting 502 - Bad Gateway error when I try to call get_rates, the body of the response is this:

<HTML><HEAD>
 <TITLE>Web Filter</TITLE>
 </HEAD>
 <BODY>
 <blockquote>
 <TABLE border=0 cellPadding=1 width="100%">
 <TR><TD>
 <big><strong></strong></big><BR><big><strong></strong></big><BR>
 <FONT face="Helvetica" SIZE=3>
 <big>Access Denied </big><br><br>
 Your request has been denied for security reason.</center><BR><BR><BR><BR>
 <FONT face="Helvetica" SIZE=2 >
 If you believe that this request should not be blocked, please contact <a href="mailto:snet@ec.europa.eu?subject=[Blocked URL] 82.13.82.123 / /taxation_customs/tic/services/VatRateWebService">EC DIGIT SNet</a>.
 <BR><br>If your request is urgent, please contact also the service helpdesk (+32)2 29 58181.
 </FONT>
 </TD></TR>
 </TABLE>
 </blockquote>
 </FONT>
 </BODY></HTML>

I see this error when running my local dev version inside a virtual machine.

Should I contact them myself? Or is this something the library needs to adapt to?

Thanks!

al45tair commented 6 years ago

Unfortunately I've been seeing the same. I have raised that through my contacts at HMRC, but I haven't heard anything back.

I should add that I don't see this everywhere, which leads me to wonder whether the problem is that the machines that do show that problem are talking over IPv6 instead of IPv4. I haven't found the time to test that, mind. It's either that, or someone is watching the service logs and blocking anything they don't recognise.

WilliamMayor commented 6 years ago

To test the IPv6 theory I disabled it on my virtual machine and tried again. I got the same error. Unless virtual box is monkeying around with the connections in a way that I don't understand, I think this is unrelated to the IP version.

What a pain. Is there a terms and conditions of use of the VIES service?

al45tair commented 6 years ago

It isn't VIES that does this — it's VRWS (the VAT Rate Web Service) — and no, there aren't any Ts & Cs, nor is it actually mentioned anywhere on the EU's website. I was given the URL by one of the member states' VAT officials.

As I say, I have asked about this, but haven't heard back yet.

Last I checked (quite some time ago now), it doesn't appear to be blocked from every IP address, which makes it more annoying because it implies that someone either did this deliberately or that they've got some kind of automated system that's misconfigured somehow.

al45tair commented 6 years ago

FWIW, I've also just emailed the address in the block message to ask about it. We'll see if they have anything to say.

WilliamMayor commented 6 years ago

Hey @al45tair any news on this?

al45tair commented 6 years ago

Sorry, no responses at all from the EU side.

kvdb commented 6 years ago

It's June already and I see the same error as well. As a workaround, could this package supply a static list of VAT rates for all countries as fallback in case the webservice is unavailable? Hopefully someone still has this data... ;-)