Skip to content

MemoryError #12

Open
Open

Description

@marcelomanzo

JMSwag asked me to report this error here (Please report to python-ed25519. I get the same error when I execute ed25519 from the repl.), this is in reference of the fololwing issue:
Digital-Sapphire/PyUpdater#45

How to reproduce:

pip install -U https://github.com/JMSwag/PyUpdater/tarball/master

Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

C:\Users\marce\repo\nextgendash>pyupdater keys -c
99 INFO: PyUpdater 0+unknown
[INFO] PyUpdater 0+unknown
99 DEBUG: PyUpdater config data folder is missing
99 ERROR: Not a PyUpdater repo: You must initialize your repository first
[ERROR] Not a PyUpdater repo: You must initialize your repository first
Please enter app name - No Default Available
--> SimRacingDash
5604 DEBUG: Under None
You entered SimRacingDash, is this correct?
[N/y]?y
8082 DEBUG: Must be true
8098 ERROR:
[ERROR]
8098 DEBUG:
Traceback (most recent call last):
File "c:\users\marce\appdata\local\programs\python\python36\lib\site-packages\pyupdater\key_handler\keys.py", line 99, in _gen_keypack
app_pri, app_pub = self._make_keys()
File "c:\users\marce\appdata\local\programs\python\python36\lib\site-packages\pyupdater\key_handler\keys.py", line 150, in _make_keys
privkey, pubkey = ed25519.create_keypair()
File "c:\users\marce\appdata\local\programs\python\python36\lib\site-packages\ed25519\keys.py", line 10, in create_keypair
sk = SigningKey(seed)
File "c:\users\marce\appdata\local\programs\python\python36\lib\site-packages\ed25519\keys.py", line 85, in init
vk_s, sk_s = _ed25519.publickey(sk_s)
MemoryError
8098 ERROR: Failed to create keypair; please report this issue on https://github.com/JMSwag/PyUpdater/issues
[ERROR] Failed to create keypair; please report this issue on https://github.com/JMSwag/PyUpdater/issues
8098 ERROR: Failed to create keypack
[ERROR] Failed to create keypack

C:\Users\marce\repo\nextgendash>

Activity

  1. soundstripe commented on Nov 25, 2017

    @soundstripe

    I'm having the same issue--

    Steps to reproduce:

    >>> import ed25519
    >>> ed25519.create_keypair()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:\Users\user\py_jamberry_api\lib\site-packages\ed25519\keys.py", line 10, in create_keypair
        sk = SigningKey(seed)
      File "C:\Users\user\py_jamberry_api\lib\site-packages\ed25519\keys.py", line 85, in __init__
        vk_s, sk_s = _ed25519.publickey(sk_s)
    MemoryError
    
  2. wolfamongus2 commented on Jan 7, 2018

    @wolfamongus2

    @soundstripe @marcelomanzo Same here, any idea how to fix? To be fair I couldn't create any keys so I did: if ns.create is True and False: Rather than just True
    log.error('You can not create off-line keys on your dev machine')
    return

  3. corneyl commented on Jan 24, 2018

    @corneyl

    Same problem here, using Windows 10 and the stellar-base package.

    $ python --version
    Python 3.6.0 :: Continuum Analytics, Inc.
    

    Traceback:

    Traceback (most recent call last):
      File ".\generate.py", line 3, in <module>
        kp = Keypair.random()
      File "C:\ProgramData\Miniconda3\lib\site-packages\stellar_base\keypair.py", line 40, in random
        return cls.from_raw_seed(seed)
      File "C:\ProgramData\Miniconda3\lib\site-packages\stellar_base\keypair.py", line 53, in from_raw_seed
        signing_key = ed25519.SigningKey(raw_seed)
      File "C:\ProgramData\Miniconda3\lib\site-packages\ed25519\keys.py", line 85, in __init__
        vk_s, sk_s = _ed25519.publickey(sk_s)
    MemoryError
    
  4. acaspy commented on Jan 31, 2018

    @acaspy

    same problem here stellar-base on win10 python 3.6.4

    signing_key = ed25519.SigningKey(raw_seed) File "C:\Users\acaspy\ticketfactory\venv\lib\site-packages\ed25519\keys.py", line 85, in __init__ vk_s, sk_s = _ed25519.publickey(sk_s) MemoryError

  5. wbinek commented on Mar 12, 2018

    @wbinek

    Same problem, Windows 10, python 3.6.4. Is there any idea how to fix it?

  6. acaspy commented on Mar 12, 2018

    @acaspy
  7. flutefreak7 commented on Feb 5, 2019

    @flutefreak7

    I'm getting the same as OP with PyUpdater.

    I am on Windows 10, Python 3.7.2 from Anaconda.

    I can do one of the above examples fine:

    >>> ed25519.create_keypair()
    (<ed25519.keys.SigningKey at 0x2684de57160>, <ed25519.keys.VerifyingKey at 0x2684de57208>)
    

    But I get the same error as OP with the call to publickey.

    Here's a bit of PyUpdater code that leads to the error:

    def _add_sig(self):
        # Adding new signature to version file
        # Raw private key will need to be converted into
        # a signing key object
        private_key_raw = self._load_private_keys()
        if private_key_raw is None:
            log.error('Private Key not found. Please '
                      'import a keypack & try again')
            return
    
        # Load update manifest
        update_data = self._load_update_data()
    
        # We don't want to verify the signature
        if 'signature' in update_data:
            log.debug('Removing signatures from version file')
            del update_data['signature']
    
        # We create a signature from the string
        update_data_str = json.dumps(update_data, sort_keys=True)
    
        private_key_raw = private_key_raw.encode('utf-8')
    
        # Creating signing key object
        private_key = ed25519.SigningKey(private_key_raw,
                                         encoding=self.key_encoding)
    

    This makes me wonder if it's something with the inputs to SigningKey - either the private_key_raw or the key_encoding. key_encoding is set to 'base64'.

  8. skyf0xx commented on Mar 28, 2019

    @skyf0xx

    moved to python 2.7.12 2018-03-12 12:17 GMT+02:00 wbinek notifications@github.com:
    …
    Same problem, Windows 10, python 3.6.4. Is there any idea how to fix it? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#12 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AQhOqQ4XzAyo33J5wUA0ClQedECJTzS2ks5tdksqgaJpZM4Pp2Lg .

    Downgraded to Python 3.6.0 and this solved it for me.

  9. okready commented on Apr 18, 2019

    @okready
    Contributor

    I opened a PR (#14) for what I believe fixes the issue. It seems to only occur with 64-bit versions of Python on Windows; 32-bit versions of Python (regardless of whether Windows itself is 32-bit or 64-bit) appear to be unaffected by the bug.

    For anyone who tried downgrading, do you recall whether you switched to a 32-bit version of Python in the process?

  10. warner commented on Jun 1, 2019

    @warner
    Owner

    I just released version 1.5 with that fix.. sorry it took so long. Could someone with an affected system give the new version a try and let me know if it works now?

  11. JMSwag commented on Jun 9, 2019

    @JMSwag

    @warner 1.5 works without issue. Thanks!

    Windows 10
    Python 64bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions