IndentationError: unexpected indent
See original GitHub issueHey, 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:
Using Theano backend.
Traceback (most recent call last):
File "D:/Dropbox/Dropbox/PhD/My Work/Code/Paper 2/src/temp.py", line 77, in <module>
trials=Trials())
File "C:\Anaconda3\envs\py34\lib\site-packages\hyperas\optim.py", line 42, in minimize
notebook_name=notebook_name, verbose=verbose)
File "C:\Anaconda3\envs\py34\lib\site-packages\hyperas\optim.py", line 62, in base_minimizer
model_str = get_hyperopt_model_string(model, data, notebook_name, verbose, stack)
File "C:\Anaconda3\envs\py34\lib\site-packages\hyperas\optim.py", line 132, in get_hyperopt_model_string
imports = extract_imports(cleaned_source, verbose)
File "C:\Anaconda3\envs\py34\lib\site-packages\hyperas\utils.py", line 31, in extract_imports
tree = ast.parse(source)
File "C:\Anaconda3\envs\py34\lib\ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 35
if conditional({{choice(['three', 'four'])}}) == 'four':
^
IndentationError: unexpected indent
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.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:16 (2 by maintainers)
Top Results From Across the Web
Python IndentationError: unexpected indent Solution
“IndentationError: unexpected indent” is raised when you indent a line of code too many times. To solve this error, make sure all of...
Read more >How do i resolve the unexpected indent error in python
As the error message indicates, you have an unexpected indent error. This error occurs when a statement is unnecessarily indented or its ...
Read more >What should I do with "Unexpected indent" in Python?
18 Answers 18 · Copy the tabs or spaces that are causing the error · Do a find and replace in your IDE...
Read more >What is unexpected indent in Python? - Net-Informations.Com
This error occurs when a statement is unnecessarily indented or its indentation does not match the indentation of former statements in the same...
Read more >Python IndentationError: unexpected indent (How to Fix This ...
The error IndentationError: unexpected indent arises if you use inconsistent indentation of tabs or whitespaces for indented code blocks such as the if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
above PR was just merged and shows an example of how to run an example without any of the issues.
Yes, the pip version is not up to date. And, there’s no such things as a dummy question 😃
pip install git+https://github.com/maxpumperla/hyperas.git@master