Giter VIP home page Giter VIP logo

Comments (5)

hakon-j-d-johnsen avatar hakon-j-d-johnsen commented on September 3, 2024

Hi Peter,

I recently submitted a pull request with some changes to get_default_auth_files() that might be responsible for your issue. Could you provide the full error message to make it easier to identify the problem?

The specific line you refer to has stayed unchanged for several months. Are you sure the this is what causes the problem? You could try to run the following command, which does the same as the line you refer to:

python3 -c "from pathlib import Path; import os; print(repr(os.path.join(Path.home(),'.dpapp')))"

I would expect the above command to return '/home/peterjh/.dpapp' in your case. Let me know if it returns something else.

Best,
Håkon

from dpt-rp1-py.

hakon-j-d-johnsen avatar hakon-j-d-johnsen commented on September 3, 2024

Could you provide the full error message to make it easier to identify the problem?

Oh, sorry. Apparently I did not read the subject line of the issue, where you actually provided the error message.

It seems like you are using a Python version older than Python 3.5, before Path.home() was introduced.

You can fix the issue either by upgrading Python or by replacing Path.home() with os.path.expanduser('~').

@janten, how important do you think it is to support older Python versions? Let me know if you want a pull request with this specific change. However, since there are currently no unit tests, it would be difficult to guarantee complete compatibility with older python versions.

from dpt-rp1-py.

wart-github avatar wart-github commented on September 3, 2024

Yep, that's the error, but oddly python --version tells me I am using 3.7.4. The proposed patch (os.path.expanduser) fixed the issue, however.

Will fiddle to see why the docs say it is in > 3.5 but for some reason my box reports 3.7.4.

from dpt-rp1-py.

janten avatar janten commented on September 3, 2024

@janten, how important do you think it is to support older Python versions? Let me know if you want a pull request with this specific change. However, since there are currently no unit tests, it would be difficult to guarantee complete compatibility with older python versions.

We never committed ourselves to any specific version of Python for this repository, so older versions are always supported on a best-effort basis only. If it's an easy fix, I'd gladly merge a PR.

from dpt-rp1-py.

hakon-j-d-johnsen avatar hakon-j-d-johnsen commented on September 3, 2024

Yep, that's the error, but oddly python --version tells me I am using 3.7.4.

Hmm, strange. Do you have different versions of python on your system? Perhaps dptrp1 was installed in such a way that it uses a different Python installation from the one you get when you run python --version?

If you want to get to the bottom of this, you could try the following commands:

Which python executable is used by dpt-rp1:

head -n1 `which dptrp1`

Which python executable is used when running python:

which python

Whether Path.home() is available when running python directly:

python -c "from pathlib import Path; print(Path.home())"

In any case, I have submitted a pull request that replaces Path.home() with os.path.expanduser('~'), in order to fix the problem for you and for people running Python < 3.5.

from dpt-rp1-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.