• SimCityWok

    Using youtube-dl to download videos and sometimes instead of MP4 it downloads WEBM.

    @jonb suggested using webview, and if that's the case, how do I do so?

    posted in Pythonista read more
  • SimCityWok

    I am on Wifi swapping to 4G when it fails (in pasted log)

    As I said in Slack, updating dulwich as per your recommendation, seems to have done the trick.

    There was an error saying something about an error renaming to dulwich.old but restarting worked

    posted in Pythonista read more
  • SimCityWok

    @JonB said:

    sounds like you already set up ssh keys. so you should be able to set up the remote url using ssh.

    Ok, I appreciate it.
    Happy to work ssh on stash out myself, but can you tell me where to start?
    I appreciate all your help

    EDIT: Dulwich error on SSH

    [alphabear-solver]$ git remote origin ssh://git@github.com/wizardofozzie/alphabear-solver.git
    [alphabear-solver]$ git push
    Attempting to push to: ssh://git@github.com/wizardofozzie/alphabear-solver.git, branch: refs/heads/master
    
    [alphabear-solver]$ git push
    Attempting to push to: ssh://git@github.com/wizardofozzie/alphabear-solver.git, branch: refs/heads/master
    stash: <class 'dulwich.errors.HangupException'>: The remote server unexpectedly closed the connection.
    
    [alphabear-solver]$ ```

    posted in Pythonista read more
  • SimCityWok

    Dulwich version (0,12,2)

    Keychain checks out.

    gh create_key stash

    [alphabear-solver]$ gh create_key stash
    stash: <class 'github.GithubException.GithubException'>: 422 {u'documentation_url': u'https://developer.github.com/v3/users/keys/#create-a-public-key', u'message': u'Validation Failed', u'errors': [{u'field': u'key', u'message': u'key is already in use', u'code': u'custom', u'resource': u'PublicKey'}]}
    

    posted in Pythonista read more
  • SimCityWok

    [~/Documents]$ cd alphabear-solver/
    [alphabear-solver]$ git init .
    stash: <type 'exceptions.OSError'>: [Errno 17] File exists: './.git'
    
    [alphabear-solver]$ ls -h
    usage: ls.py [-h] [-1] [-a] [-l] [files [files ...]]
    
    positional arguments:
      files           files to be listed
    
    optional arguments:
      -h, --help      show this help message and exit
      -1, --one-line  List one file per line
      -a, --all       do not ignore entries starting with .
      -l, --long      use a long listing format
    [alphabear-solver]$ ls -1a
    .git
    README.md
    ab.py
    dictionary.txt
    hashdict.py
    map.json
    solver.py
    [alphabear-solver]$ rm .git
    .git: is a directory
    [alphabear-solver]$ rm -r .git
    [alphabear-solver]$ git init .
    [alphabear-solver]$ git add *
    Adding README.md
    Adding ab.py
    Adding dictionary.txt
    Adding hashdict.py
    Adding map.json
    Adding solver.py
    [alphabear-solver]$ git commit
    Commit Message: bare Pythonista commit
    Author Name: wizardofozzie
    Save this setting? [y/n]y
    Author Email: djsim4242@gmail.com
    Save this setting? [y/n]y
    628238a51a09ccbff9d389e2a27cd340d4ffe640
    [alphabear-solver]$ gh create alphabear-solver -i
    Created https://github.com/wizardofozzie/alphabear-solver
    [alphabear-solver]$ git remote origin https://github.com/wizardofozzie/alphabear-solver.git
    [alphabear-solver]$ git push
    Attempting to push to: https://github.com/wizardofozzie/alphabear-solver.git, branch: refs/heads/master
    stash: <class 'urllib2.URLError'>: <urlopen error [Errno 32] Broken pipe>
    
    [alphabear-solver]$ 
    

    Same issue

    posted in Pythonista read more
  • SimCityWok

    The fastkml library tries to import pkg_resources in the __init__.py file (CODE).

    from pkg_resources import get_distribution, DistributionNotFound
    

    Is there a workaround for this?

    posted in Pythonista read more
  • SimCityWok

    So, 1 & 2 don't work as I posted above, @JonB
    I really appreciate the help.

    Let me rephrase the problem: if I delete the GitHub repo, how can I push my folder to GitHub?

    posted in Pythonista read more
  • SimCityWok

    StaSh v0.6.13
    Tip: Send a running command to background by pressing the CZ button (Ctrl-Z on external keyboard)
    [~/Documents]$ cd alphabear-solver/
    [alphabear-solver]$ git fetch http://github.com/wizardofozzie/alphabear-solver.git
    Starting fetch, this could take a while
    stash: <class 'dulwich.errors.HangupException'>: The remote server unexpectedly closed the connection.
    
    [alphabear-solver]$ git fetch http://github.com/wizardofozzie/alphabear-solver.git
    Starting fetch, this could take a while
    stash: <class 'dulwich.errors.HangupException'>: The remote server unexpectedly closed the connection.
    
    [alphabear-solver]$ git fetch http://github.com/wizardofozzie/alphabear-solver.git
    Starting fetch, this could take a while
    stash: <class 'dulwich.errors.HangupException'>: The remote server unexpectedly closed the connection.
    
    [alphabear-solver]$ git fetch https://github.com/wizardofozzie/alphabear-solver.git
    Starting fetch, this could take a while
    Counting objects: 3, done.
    Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
    Fetch successful.  Importing refs
    imported refs/remotes/origin/master a650a1a9b804dde858f74928fc8e615a97e2f5a4
    Checking for deleted remote refs
    Fetch complete
    [alphabear-solver]$ git merge
    ______________________________
    stash: <type 'exceptions.TypeError'>: object of type 'NoneType' has no len()
    
    [alphabear-solver]$ git merge -h
    ______________________________
    usage: git merge' [--msg <msg>] [<commit>]
        git merge --abort
    
        
        merges <commit> into HEAD, or remote tracking branch if commit not specified.
        <commit> can be a local or remote ref, or an existing commit sha.
    
        merge will handle unambiguous conflicts between head and other 
        merge head, and will insert conflict markers if conflicts cannot be resolved.  
        note that the strategy used will prefer changes in the local head.  
        for instance, if HEAD deleted a section, while MERGE_HEAD modified the same 
        action, the section will be deleted from the final without indicating a conflict.
          
        be sure to commit any local changes before running merge, as files in working tree (i.e on disk) are changed, and checked in, which will probably overwrite any local uncomitted changes.
        
        note merge will not actually commit anything.  run git commit to commit a successful merge.
    
        
        --abort will remove the MERGE_HEAD and MERGE_MSG files, and will reset staging area, but wont affect files on disk.  use git reset --hard or git checkout if this is desired.
        
    
    positional arguments:
      commit      commit sha, local branch, or remote branch name to merge from
    
    optional arguments:
      -h, --help  show this help message and exit
      --msg MSG   commit message to store
      --abort     abort in progress merge attempt
    [alphabear-solver]$ git merge HEAD
    ______________________________
    Fast forwarding master to ecb4a1958ef8b1e288151822ff087f3f64894745
    [alphabear-solver]$ git commit
    Commit Message: 1
    46c9d246c69a3506ec3336357e6f9baea52caf2f
    [alphabear-solver]$ git push 
    Attempting to push to: https://github.com/wizardofozzie/alphabear-solver.git, branch: refs/heads/master
    stash: <class 'urllib2.URLError'>: <urlopen error [Errno 32] Broken pipe>
    
    [alphabear-solver]$ git fetch https://github.com/wizardofozzie/alphabear-solver.git
    Starting fetch, this could take a while
    Fetch successful.  Importing refs
    imported refs/remotes/origin/master a650a1a9b804dde858f74928fc8e615a97e2f5a4
    Checking for deleted remote refs
    Fetch complete
    [alphabear-solver]$ git branch newb origin/master
    [alphabear-solver]$ git reset newb --soft
    updating HEAD to newb
    [alphabear-solver]$ git commit
    Commit Message: 2
    71e91a769320587655bae120454d7fce88ee367b
    [alphabear-solver]$ git push
    Attempting to push to: https://github.com/wizardofozzie/alphabear-solver.git, branch: refs/heads/newb
    stash: <class 'urllib2.URLError'>: <urlopen error [Errno 32] Broken pipe>
    
    [alphabear-solver]$ git remote sshorigin ssh://git@github.com/wizardofozzie/alphabear-solver.git
    [alphabear-solver]$ ssh_keygen
    stash: ssh_keygen: command not found
    
    [alphabear-solver]$ 
    

    posted in Pythonista read more
  • SimCityWok

    [alphabear-solver]$ git push https://github.com/wizardofozzie/alphabear-solver.git
    Attempting to push to: https://github.com/wizardofozzie/alphabear-solver.git, branch: refs/heads/master
    stash: <class 'urllib2.URLError'>: <urlopen error [Errno 32] Broken pipe>
    

    I'm getting the same error trying to push the commit to GitHub irrespective of whether I use http or https.

    The weird thing is, another repo worked perfectly fine just prior to trying to push this repo (using https, http threw an error).

    Can anyone enlighten me as to what the issue here is? (Pythonista 3, latest Stash version)

    posted in Pythonista read more
  • SimCityWok

    One final query....
    If I wanted to implement this, how would I change the class code?

    def make(bits=256):
        assert bits in (256, 512)
        hashes = []
        for hsh in range(int(bits//256)):
            myhash = TouchHash()
            hashes.append(myhash)
        return "".join(hashes)
    

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!