我通过以下线程更改了我的用户名:如何更改我的用户名?
这是几周前的事,我刚刚遇到了第一个问题,Astropy (for python 2.7) 在下载文件时遇到问题,因为它在错误的缓存文件夹中查找。错误消息:IOError: [Errno 2] No such file or directory: u'/home/jill/.astropy/cache/download/py2/bf6211066f3d9a9b058d46183baba6ab' 。(我的旧用户名是 jill,我可以看到这个文件存在于我的新主文件夹中)。
逐行调试后,似乎错误来自“搁置”模块。如,这是 /home/jill 首次在 url 中引入的地方。
我尝试重新安装 python(sudo apt-get install --reinstall python2.7)并重新安装 astropy(pip2 卸载 astropy,pip2 安装 astropy)。
* Pycharm 上的完整错误信息:
File "/home/jpsotka/Dropbox/Colibri/Simulation/corrections.py", line 74, in get_zenith
elginfield_altaz = ecliptic(lat=elat*u.degree, lon=elon*u.degree).transform_to(AltAz(obstime=time, location=elginfield))
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/coordinates/baseframe.py", line 934, in transform_to
return trans(self, new_frame)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/coordinates/transformations.py", line 1314, in __call__
curr_coord = t(curr_coord, curr_toframe)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/coordinates/transformations.py", line 914, in __call__
return supcall(fromcoord, toframe)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/coordinates/builtin_frames/cirs_observed_transforms.py", line 53, in cirs_to_altaz
xp, yp = get_polar_motion(obstime)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/coordinates/builtin_frames/utils.py", line 43, in get_polar_motion
xp, yp, status = iers.IERS_Auto.open().pm_xy(time, return_status=True)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/utils/iers/iers.py", line 600, in open
cls.iers_table = cls.read(file=filename)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/utils/iers/iers.py", line 456, in read
iers_a = Table.read(file, format='cds', readme=readme)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/table/table.py", line 2521, in read
out = io_registry.read(cls, *args, **kwargs)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/io/registry.py", line 531, in read
data = reader(*args, **kwargs)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/io/ascii/connect.py", line 39, in io_read
return read(filename, format=format, **kwargs)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/io/ascii/ui.py", line 353, in read
dat = reader.read(table)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/io/ascii/cds.py", line 322, in read
return super(Cds, self).read(table)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/io/ascii/core.py", line 1159, in read
self.lines = self.inputter.get_lines(table)
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/io/ascii/core.py", line 296, in get_lines
encoding=self.encoding) as fileobj:
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/home/jpsotka/.local/lib/python2.7/site-packages/astropy/utils/data.py", line 206, in get_readable_fileobj
fileobj = open(name_or_obj, 'rb')
IOError: [Errno 2] No such file or directory: u'/home/jill/.astropy/cache/download/py2/bf6211066f3d9a9b058d46183baba6ab'
Process finished with exit code 1