Skip to content
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

indentation error in utils.py #18

Open
Death916 opened this issue Jul 2, 2018 · 9 comments
Open

indentation error in utils.py #18

Death916 opened this issue Jul 2, 2018 · 9 comments

Comments

@Death916
Copy link

Death916 commented Jul 2, 2018

started using python 3.7 and when i added pyzmail to my env and run a program using it i got this error:

Traceback (most recent call last): File "d:/code/emailtrade/getsignal.py", line 3, in <module> import pyzmail File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 668, in _load_unlocked File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible File "C:\Users\death\Miniconda3\envs\emailtrade\lib\site-packages\pyzmail-1.0.3-py3.7.egg\pyzmail\__init__.py", line 7, in <module> File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 963, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 906, in _find_spec File "<frozen importlib._bootstrap_external>", line 1280, in find_spec File "<frozen importlib._bootstrap_external>", line 1254, in _get_spec File "<frozen importlib._bootstrap_external>", line 1235, in _legacy_get_spec File "<frozen importlib._bootstrap>", line 441, in spec_from_loader File "<frozen importlib._bootstrap_external>", line 594, in spec_from_file_location File "C:\Users\death\Miniconda3\envs\emailtrade\lib\site-packages\pyzmail-1.0.3-py3.7.egg\pyzmail\utils.py", line 31 b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' \ ^ IndentationError: unexpected indent

Does not happen if I use the 3.6 version installed using easy_install or pip

@d-ricke
Copy link

d-ricke commented Aug 17, 2018

I seem to have had similar problems just running import pyzmail from idle.

Traceback (most recent call last):
File "<pyshell#0>", line 1, in
import pyzmail
File "C:\Users\d_ric\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyzmail_init_.py", line 7, in
from . import utils
File "C:\Users\d_ric\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyzmail\utils.py", line 31
b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'
^
IndentationError: unexpected indent

@Greco1899
Copy link

Greco1899 commented Aug 19, 2018

Running Python 3.7.0, installed using easy_install, got this when running import pyzmail from IDLE.

Traceback (most recent call last):
File "<pyshell#2>", line 1, in
import pyzmail
File "C:\Program Files\Python37\lib\site-packages\pyzmail_init_.py", line 7, in
from . import utils
File "C:\Program Files\Python37\lib\site-packages\pyzmail\utils.py", line 31
b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'
^
IndentationError: unexpected indent

@helixglobal
Copy link

Running Python 3.7.0, installed using easy_install, got this when running import pyzmail from IDLE.

Traceback (most recent call last):
File "<pyshell#2>", line 1, in
import pyzmail
File "C:\Program Files\Python37\lib\site-packages\pyzmail_init_.py", line 7, in
from . import utils
File "C:\Program Files\Python37\lib\site-packages\pyzmail\utils.py", line 31
b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'
^
IndentationError: unexpected indent

@zhanghaiping1
Copy link

i have the same problem. can anyone help please.

@marko-knoebl
Copy link

marko-knoebl commented Nov 8, 2018

Apparently for some installations the utils.py file will end up with extra newlines.

Instead of this content:

invalid_chars_in_filename=b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f' \
                          b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' \
                          b'<>:"/\\|?*\%\''

it will be like this:

invalid_chars_in_filename=b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f' \

                          b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' \

                          b'<>:"/\\|?*\%\''

- resulting in a syntax error.

Not sure why this happens. It definitely only happens on some computers.

For now I've bypassed the issue by manually deleting the extra newlines from the file.

@ReviewEdge
Copy link

Apparently for some installations the utils.py file will end up with extra newlines.

Instead of this content:

invalid_chars_in_filename=b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f' \
                          b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' \
                          b'<>:"/\\|?*\%\''

it will be like this:

invalid_chars_in_filename=b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f' \

                          b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' \

                          b'<>:"/\\|?*\%\''
  • resulting in a syntax error.

Not sure why this happens. It definitely only happens on some computers.

For now I've bypassed the issue by manually deleting the extra newlines from the file.

Having the same issue, how were you able to find and edit this file? I can't get past the "pyzmail-1.0.3-py3.7.egg" file, and I'm looking for "venv\lib\site-packages\pyzmail-1.0.3-py3.7.egg\pyzmail\utils.py".

@ghost
Copy link

ghost commented Jan 26, 2019

Writing to confirm suggestion made by @marko-knoebl is the fix. Experienced this issue across 3 completely different machines all on Python3.7.

@pajiji
Copy link

pajiji commented Feb 13, 2019

Apparently for some installations the utils.py file will end up with extra newlines.
Instead of this content:

invalid_chars_in_filename=b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f' \
                          b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' \
                          b'<>:"/\\|?*\%\''

it will be like this:

invalid_chars_in_filename=b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f' \

                          b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' \

                          b'<>:"/\\|?*\%\''
  • resulting in a syntax error.

Not sure why this happens. It definitely only happens on some computers.
For now I've bypassed the issue by manually deleting the extra newlines from the file.

Having the same issue, how were you able to find and edit this file? I can't get past the "pyzmail-1.0.3-py3.7.egg" file, and I'm looking for "venv\lib\site-packages\pyzmail-1.0.3-py3.7.egg\pyzmail\utils.py".

change .egg to .zip and access the utils.py file to edit.

@sebidelamata
Copy link

Apparently for some installations the utils.py file will end up with extra newlines.

Instead of this content:

invalid_chars_in_filename=b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f' \
                          b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' \
                          b'<>:"/\\|?*\%\''

it will be like this:

invalid_chars_in_filename=b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f' \

                          b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' \

                          b'<>:"/\\|?*\%\''
  • resulting in a syntax error.

Not sure why this happens. It definitely only happens on some computers.

For now I've bypassed the issue by manually deleting the extra newlines from the file.

Just wanted to say this worked for me (deleting the new lines in the utils.py of the pyzmail package). Did not have any issues with .egg files just opened the utils.py file in PyCharm changed it and now it works.

Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants