BrainPad / FindYourCandy

Apache License 2.0
77 stars 18 forks source link

Error on executing build_package.sh at README of webapp #33

Closed kazunori279 closed 7 years ago

kazunori279 commented 7 years ago

I got two issues:

brainpad@candy0:~/FindYourCandy/train$ build_package.sh gs://fyc-ml/packageTraceback (most recent call last):
  File "/usr/lib/command-not-found", line 23, in <module>
    import gettext
  File "/usr/lib/python3.5/gettext.py", line 49, in <module>
    import locale, copy, io, os, re, struct, sys
  File "/usr/lib/python3.5/locale.py", line 16, in <module>
    import re
  File "/usr/lib/python3.5/re.py", line 335, in <module>
    import copyreg
  File "/usr/local/lib/python2.7/dist-packages/copyreg/__init__.py", line 7, in <module>
    raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 53, in apport_excepthook
    if not enabled():
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
    import re
  File "/usr/lib/python3.5/re.py", line 335, in <module>
    import copyreg
  File "/usr/local/lib/python2.7/dist-packages/copyreg/__init__.py", line 7, in <module>
    raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 23, in <module>
    import gettext
  File "/usr/lib/python3.5/gettext.py", line 49, in <module>
    import locale, copy, io, os, re, struct, sys
  File "/usr/lib/python3.5/locale.py", line 16, in <module>
    import re
  File "/usr/lib/python3.5/re.py", line 335, in <module>
    import copyreg
  File "/usr/local/lib/python2.7/dist-packages/copyreg/__init__.py", line 7, in <module>
    raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
rindai87 commented 7 years ago

Can you replace python to python2 on following Line in build_package.sh and re-execute build_package.sh ? https://github.com/BrainPad/FindYourCandy/blob/master/train/build_package.sh#L11.

max-hana commented 7 years ago

You have to open a new terminal or source ~/.bashrc . It's a nature of Google Cloud SDK. It put some mods in .bashrc.

You'll find something like this at the end of .bashrc

# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/brainpad/Downloads/google-cloud-sdk/path.bash.inc' ]; then source '/home/brainpad/Downloads/google-cloud-sdk/path.bash.inc'; fi

# The next line enables shell command completion for gcloud.
if [ -f '/home/brainpad/Downloads/google-cloud-sdk/completion.bash.inc' ]; then source '/home/brainpad/Downloads/google-cloud-sdk/completion.bash.inc'; fi
kazunori279 commented 7 years ago

Succeeded after opening a new terminal. Can you modify README to address these two issues (cd ../train and reopening terminal)

rindai87 commented 7 years ago

OK, I'll update it.

rindai87 commented 7 years ago
kazunori279 commented 7 years ago

Thanks!!