auto shift throws an error #2

Closed
opened 2018-09-30 01:02:25 +00:00 by coolaj86 · 1 comment
ceasar.py decrypt "combodwocckqo"
Please enter the shift you would like to use (Just hit enter if you don't know the shift used):
Traceback (most recent call last):
  File "ceasar.py", line 110, in <module>
    freq()
  File "ceasar.py", line 103, in freq
    decrypt() # Decrypt using the frequency found in here.
  File "ceasar.py", line 78, in decrypt
    letter = int(letterPos) - int(shiftNum) # Take the position of the letter and the shift number and add them for the enciphered letter.
ValueError: invalid literal for int() with base 10: ''
``` ceasar.py decrypt "combodwocckqo" ``` ``` Please enter the shift you would like to use (Just hit enter if you don't know the shift used): Traceback (most recent call last): File "ceasar.py", line 110, in <module> freq() File "ceasar.py", line 103, in freq decrypt() # Decrypt using the frequency found in here. File "ceasar.py", line 78, in decrypt letter = int(letterPos) - int(shiftNum) # Take the position of the letter and the shift number and add them for the enciphered letter. ValueError: invalid literal for int() with base 10: '' ```
Owner
Fixed in https://git.coolaj86.com/josh/python-hard-way/src/commit/baa81c46d1431ed8e4eeda13dcae1a0983134b5d/Caeser-Cipher/caeser-cipher.py
josh closed this issue 2018-09-30 03:20:32 +00:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: josh/python-hard-way#2
No description provided.