• Register

Ne morem odpreti datotek za domačo nalogo (Internal Python error in the inspect module)

+11 votes
305 views

Pozdravljeni,

Imam težavo, in sicer sem domačo nalogo (ipynb datoteko) 2x prenesel na namizje, pri tem pa je nova verzija zamenjala staro na kateri sem imel že rešeno (eno) nalogo.. Zdaj pa je problem ko želim zagnati prvo vrstico:

from mojladisksi import poslji
import numpy as np

saj mi vrne napako:

ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

Traceback (most recent call last):
  File "//anaconda/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-10-d06f391c7dca>", line 1, in <module>
    from mojladisksi import poslji
ImportError: No module named 'mojladisksi'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "//anaconda/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 1821, in showtraceback
    stb = value._render_traceback_()
AttributeError: 'ImportError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "//anaconda/lib/python3.5/site-packages/IPython/core/ultratb.py", line 1132, in get_records
    return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
  File "//anaconda/lib/python3.5/site-packages/IPython/core/ultratb.py", line 313, in wrapped
    return f(*args, **kwargs)
  File "//anaconda/lib/python3.5/site-packages/IPython/core/ultratb.py", line 358, in _fixed_getinnerframes
    records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
  File "//anaconda/lib/python3.5/inspect.py", line 1453, in getinnerframes
    frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
  File "//anaconda/lib/python3.5/inspect.py", line 1410, in getframeinfo
    filename = getsourcefile(frame) or getfile(frame)
  File "//anaconda/lib/python3.5/inspect.py", line 672, in getsourcefile
    if getattr(getmodule(object, filename), '__loader__', None) is not None:
  File "//anaconda/lib/python3.5/inspect.py", line 701, in getmodule
    file = getabsfile(object, _filename)
  File "//anaconda/lib/python3.5/inspect.py", line 685, in getabsfile
    return os.path.normcase(os.path.abspath(_filename))
  File "//anaconda/lib/python3.5/posixpath.py", line 361, in abspath
    cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory
Kako bi lahko to rešil?
Lp, Grega
asked Dec 27, 2016 by grega_s (600 points)
edited Dec 28, 2016 by janko.slavic

1 Answer

+2 votes
 
Best answer
Poskusite pobrisati lokalne datoteke in še enkrat prenesti datoteke z domačo nalogo s spleta. Vse prenesene datoteke iz .zip arhiva morate obvezno razširiti v isto mapo.
answered Dec 27, 2016 by dgorjup (61,010 points)
selected Dec 28, 2016 by janko.slavic
Najlepša hvala, zdaj deluje.
...