New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndentationError: unexpected indent #67
Comments
I tried replacing the tabs with spaces in my own example file and it didn't work. |
I have the same problem with python 2.7. |
Seems to be a bug with the function that strips the source of comments remove_all_comments.
` And this is the output:
` |
I commented out and worked.
|
I am having the same issues and commenting out isn't helping. I also see it with the data function: def data():
(X_train, y_train), (X_test, y_test) = mnist.load_data()
nb_class = 10
# Reshape X data from 2D to 1D (28x28 to 784)
X_train = X_train.reshape(60000,784).astype('float32')
X_test = X_test.reshape(10000,784).astype('float32')
X_train /= 255
X_test /= 255
# Convert Y labels to Categorical One-Hot Format
y_train = np_utils.to_categorical(y_train, nb_class)
y_test = np_utils.to_categorical(y_test, nb_class)
return X_train, y_train, X_test, y_test And the error code is: File "<unknown>", line 29
X_train = X_train.reshape(60000,784).astype('float32')
^
IndentationError: unexpected indent I saw #54 but it's not clear from there how to rectify the issue. |
Actually, I realize this bug has been fixed in |
If you remove all comments ( # .... ) from your code, it will work. Of course this is only a short term workaround and I hope remove_all_comments will get fixed properly. |
Any chance this change can get added to pip as well soon? |
So is this version not uo to date? https://pypi.python.org/pypi/hyperas/0.3 Sorry for the dummy question but how can I install directly from |
Yes, the pip version is not up to date. And, there's no such things as a dummy question :)
|
Thanks a lot ! |
I used --upgrade option to update my previously installed version from pip. Otherwise it says requirement already satisfied for all packages. pip install git+https://github.com/maxpumperla/hyperas.git@master --upgrade |
above PR was just merged and shows an example of how to run an example without any of the issues. |
I think this is resolved, please re-open in case I'm wrong! thanks |
Ola amigos estou com mesmo problema sera que podiam me ajudar
r = sr.Recognizer() try: |
I had the same issue, I solved it by changing my tab-indented file to a 4 space-indented file. Took awhile to debug, seems like this could still use some work. |
Hey, I just installed on python 3.4.2 and I'm using the PyCharm IDE. I've opened the example file in my ide and attempted to run it. The following error occurs:
I understand that this may be because there is a mixing of tabs and spaces? I will be attempting to resolve it under that understanding next and update here if that is the case.
The text was updated successfully, but these errors were encountered: