• Register

Domača naloga INP

+1 vote
96 views

Zdravo!

Zanima me, kaj naj naredim ko zaženem prvo vrstico naloge in mi pokaže ta ERROR.

Hvala za odgovor :)

Downloading file: mojladisksi.py
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
<ipython-input-1-261126e0f137> in <module>
      1 from sync import sync
----> 2 sync('/moj.ladisk.si/mojladisksi.py')
      3 from mojladisksi import poslji
      4 import numpy as np

~\Documents\FAKS\2.letnik\4 semester\PiNM\pypinm\dn\Preskar_Ana_INP_Tue_21_04_20_18-01-00\Preskar_Ana_INP_Tue_21_04_20_18-01-00\sync.py in sync(filename, repo, max_age_of_file)
     12     else:
     13         print('Downloading file: {:s}'.format(local_filename))
---> 14         file = urllib.request.urlopen(repo+filename).read()
     15         with open(local_filename, 'wb') as f:
     16             f.write(file)

C:\ProgramData\Anaconda3\lib\urllib\request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
    220     else:
    221         opener = _opener
--> 222     return opener.open(url, data, timeout)
    223 
    224 def install_opener(opener):

C:\ProgramData\Anaconda3\lib\urllib\request.py in open(self, fullurl, data, timeout)
    529         for processor in self.process_response.get(protocol, []):
    530             meth = getattr(processor, meth_name)
--> 531             response = meth(req, response)
    532 
    533         return response

C:\ProgramData\Anaconda3\lib\urllib\request.py in http_response(self, request, response)
    639         if not (200 <= code < 300):
    640             response = self.parent.error(
--> 641                 'http', request, response, code, msg, hdrs)
    642 
    643         return response

C:\ProgramData\Anaconda3\lib\urllib\request.py in error(self, proto, *args)
    567         if http_err:
    568             args = (dict, 'default', 'http_error_default') + orig_args
--> 569             return self._call_chain(*args)
    570 
    571 # XXX probably also want an abstract factory that knows when it makes

C:\ProgramData\Anaconda3\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args)
    501         for handler in handlers:
    502             func = getattr(handler, meth_name)
--> 503             result = func(*args)
    504             if result is not None:
    505                 return result

C:\ProgramData\Anaconda3\lib\urllib\request.py in http_error_default(self, req, fp, code, msg, hdrs)
    647 class HTTPDefaultErrorHandler(BaseHandler):
    648     def http_error_default(self, req, fp, code, msg, hdrs):
--> 649         raise HTTPError(req.full_url, code, msg, hdrs, fp)
    650 
    651 class HTTPRedirectHandler(BaseHandler):

HTTPError: HTTP Error 500: Internal Server Error

 

asked Apr 21 by anapreskar (200 points)
reopened Apr 21 by dgorjup

1 Answer

0 votes
 
Best answer
More delati, js sm isto vprašanje postavil 2 minute pred tabo. Sem resetiral kernel in internet, pa še ni delalo nato pa počakal 10min pa zj lepo vse dela. Mislim da je bil problem v serverju.

Veselo reševanje :)
answered Apr 21 by zigazupanc (800 points)
selected Apr 21 by dgorjup
Če ti ne deluje, probaj vse zapreti, izklopiti internet in znova poženi. Kolegu je tako potem vse vredu delovalo.
...