Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError when moving configuration file #5898

Closed
Hnasar opened this issue May 23, 2014 · 3 comments · Fixed by #5917
Closed

OSError when moving configuration file #5898

Hnasar opened this issue May 23, 2014 · 3 comments · Fixed by #5917
Milestone

Comments

@Hnasar
Copy link

Hnasar commented May 23, 2014

  1. Why are you moving something that adheres to http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html elsewhere???? I want fewer things cluttering up my home directory, not more! Really. I am disappoint.
  2. use shutil.move
  3. my ~/.config/ is a symlink to a different filesystem than my ~/
    __05:54:43 fdata $ ipython
    /media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/utils/path.py:302: UserWarning: Moving ~/.config/ipython to ~/.ipython
      warnings.warn('Moving {0} to {1}'.format(cu(xdg_ipdir), cu(ipdir)))
    Traceback (most recent call last):
      File "/home/hashem/pyve/bin/ipython", line 11, in <module>
        sys.exit(start_ipython())
      File "/media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/__init__.py", line 120, in start_ipython
        return launch_new_instance(argv=argv, **kwargs)
      File "/media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/config/application.py", line 563, in launch_instance
        app.initialize(argv)
      File "<string>", line 2, in initialize
      File "/media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
        return method(app, *args, **kwargs)
      File "/media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 321, in initialize
        super(TerminalIPythonApp, self).initialize(argv)
      File "<string>", line 2, in initialize
      File "/media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
        return method(app, *args, **kwargs)
      File "/media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/core/application.py", line 387, in initialize
        self.init_profile_dir()
      File "/media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/core/application.py", line 295, in init_profile_dir
        p = ProfileDir.find_profile_dir_by_name(self.ipython_dir, self.profile, self.config)
      File "/media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/utils/traitlets.py", line 342, in __get__
        value = method()
      File "/media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/core/application.py", line 140, in _ipython_dir_default
        d = get_ipython_dir()
      File "/media/hashem/fdata/fdata/pyve/local/lib/python2.7/site-packages/IPython/utils/path.py", line 303, in get_ipython_dir
        os.rename(xdg_ipdir, ipdir)
    OSError: [Errno 18] Invalid cross-device link

    If you suspect this is an IPython bug, please report it at:
        https://github.com/ipython/ipython/issues
    or send an email to the mailing list at ipython-dev@scipy.org

    You can print a more detailed traceback right now with "%tb", or use "%debug"
    to interactively debug it.

    Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
        c.Application.verbose_crash=True
@Carreau
Copy link
Member

Carreau commented May 24, 2014

  1. No it does not adhere to it, as it stores cached files and other stuff that do not comply to the standard.

The rational was that the logic to store the IPython config was alway wrong somewhere, and too complicated, so we removed the platform specific logic. Then packager are responsible to make it coherent with their platform to be XDG compliant or not.

2 . I suspect shutils.move was not use because of windows problem, but we can check.

Pull request welcome, though I'm not sure how to test it.

Cf #4457 for background.

@takluyver
Copy link
Member

On 24 May 2014 06:34, "Matthias Bussonnier" notifications@github.com wrote

The rational was that the logic to store the IPython config was alway
wrong somewhere, and too complicated, so we removed the platform specific
logic. Then packager are responsible to make it coherent with their
platform to be XDG compliant or not.

We don't encourage packagers to change it, though, because then users
wouldn't find their files where the docs say to look.

We switched back to ~/.ipython to make it simple to explain where those
files are for all platforms. Also, as Matthias said, we were never really
following the xdg spec properly anyway, because we mix config files and
application data.

@minrk minrk added this to the 3.0 milestone May 28, 2014
@minrk
Copy link
Member

minrk commented May 28, 2014

should be fixed by #5917.

@minrk minrk modified the milestones: 2.2, 3.0 May 28, 2014
minrk added a commit that referenced this issue Jun 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants