Git Product home page Git Product logo

Comments (12)

treyhunner avatar treyhunner commented on June 18, 2024 2

I experienced this same issue. Creating a python3.5 virtual environment fixed the issue.

It would be wonderful to be able to use this on python3.6.

from briefcase.

capitanjacksparrow avatar capitanjacksparrow commented on June 18, 2024 1

Great...that was the problem! Everything works fine now :)

Thank you very much for your help!

from briefcase.

LiamBrenner avatar LiamBrenner commented on June 18, 2024

Update

I can see it's failing because the cookiecutter does not yet have a python 3.6 branch, so perhaps that should fail more gracefully, or provide options of which branch to checkout?

from briefcase.

eliasdorneles avatar eliasdorneles commented on June 18, 2024

Yeah, I agree, I was thinking maybe we could fallback to previous versions of the support package, and show a warning a message saying that "You're using Python 3.6, which isn't fully supported -- using Python 3.5 support package for now".

from briefcase.

treyhunner avatar treyhunner commented on June 18, 2024

I love the idea of warning the user that 3.6 isn't supported! How could we do that? In setup.py? Or do we need some kind of install or import hook?

from briefcase.

eliasdorneles avatar eliasdorneles commented on June 18, 2024

For just showing the message, one idea would be to list the branches of the remote template repo (using git ls-remote --heads GIT_REPO_URL) here, check if the user's Python major / minor version is in the list and show an error if not.

from briefcase.

capitanjacksparrow avatar capitanjacksparrow commented on June 18, 2024

Hi, I had the same issue and so I deleted the virtual environment, installed Python 3.5 and repeated the procedure to install briefcase with python 3.5.
However, I still get the same error...any ideas?

from briefcase.

eliasdorneles avatar eliasdorneles commented on June 18, 2024

@capitanjacksparrow hm, I'd expect everything to work with Python 3.5. Can you try again, taking note of every step (from creating a virtualenv) and then post here these steps that reproduce the error? Thanks!

from briefcase.

capitanjacksparrow avatar capitanjacksparrow commented on June 18, 2024

@eliasdorneles thank you very much for you response. I've tried again and in the following I explain to you the detailed steps (sorry for the long message :) ).
I’m working on a iMac, which has jet installed Python2.7, so I’ve installed Python 3.5 and the terminal command to use it is "python3.5" since "python" is already taken by Python2.7.
For the same reason I used "pip3" in all the instructions of the tutorial.
These are the commands list I executed to set up the environment, as indicated in
https://briefcase.readthedocs.io/en/latest/intro/getting-started.html

I created a directory called BeeWareProjects at a path /myuser_path/ and inside it I executed:
$ mkdir tutorial
$ cd tutorial
$ python3.5 -m venv venv
$ . venv/bin/activate
$ pip3 install briefcase

All these commands ended without any error.
Then I followed the instructions found here (I’m still in the tutorial directory, with the venv activated):
https://briefcase.readthedocs.io/en/latest/tutorials/tutorial-0.html

$ pip install cookiecutter briefcase
$ cookiecutter https://github.com/pybee/briefcase-template
$ cd helloworld
…update the file helloworld/app.py to return Hello World
$ python setup.py ios -s

[Note: inside the venv I used “pip” and “python” because I checked they are actually Python3.5.
However, I also tried using my pip3 and pyhton3.5 shortcut, but nothing changed]
Here I got the error:

...
cookiecutter.exceptions.RepositoryNotFound: A valid repository for “/myuser_path/.cookiecutters/Python-iOS-template" could not be found in the following locations:
/myuser_path/.cookiecutters/Python-iOS-template
/myuser_path/.cookiecutters/Python-iOS-template

Any help is really appreciated

from briefcase.

eliasdorneles avatar eliasdorneles commented on June 18, 2024

Hi @capitanjacksparrow thanks for the detailed steps!
Indeed inside the virtualenv it's best to use just python and pip! 👍

So, I believe you've got a case of a corrupted Git repository under directory /myuser_path/.cookiecutters/Python-iOS-template.
Can you try deleting that directory and then try again the same steps?

from briefcase.

eliasdorneles avatar eliasdorneles commented on June 18, 2024

I have a better understanding of this problem now, this is related to #76 which partially fixed the problem by doing a git checkout for the correct branch when we reuse the cookiecutter template that was already downloaded.

I propose one additional fix checking for the cases of the branch not existing (in the case someone is using Python 3.6 and there is no branch 3.6 yet) or for the branch to be an invalid cookiecutter template (for example, someone creates a version branch from the wrong tree, say, from master), that will do the following:

  • run git fetch first (to fetch any new branches)
  • if the git checkout fails, we warn the user about the failure, tell which branch we attempted to checkout and which branches exist, if any
  • after doing git checkout, we look for a cookiecutter.json file in the template directory. If it doesn't exist, we abort execution, telling the user that the repository isn't a valid template, and suggest deleting it

from briefcase.

isabelapnt avatar isabelapnt commented on June 18, 2024

I'm working on it.

from briefcase.

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.