Giter Site home page Giter Site logo

Comments (8)

rodalarcon avatar rodalarcon commented on July 18, 2024 4

The code was developed for Python 2.7. For Python 3 the following changes should be made:

On build.py:

  1. Ensure the argument for all the print calls is inside parenthesis, i.e., print('zipping %s as %s' % (os.path.join(dirname, filename))
  2. Replace SimpleHTTPServer by http.server, at import and in the webuiserver function
  3. Replace SocketServer by socketserver, at import and in the webuiserver function
  4. Replace 'iteritems' by 'items' on lines 160 and 200 for the dict() attribute.

On /client/video_cap_ipcam.py:

  1. Ensure the argument for all the print calls is inside parenthesis, i.e., print("Sending image to Kinesis")
  2. Replace 'cPickle' by 'pickle' on lines 12 and 59

On /client/video_cap.py:

  1. Ensure the argument for all the print calls is inside parenthesis, i.e., print("Sending image to Kinesis")
  2. Replace 'cPickle' by 'pickle' on lines 7, 12 and 53

Also on /lambda/imageprocessor/imageprocessor.py:

  1. Replace 'cPickle' by 'pickle' on lines 13 and 67

On AWS, function imageprocessor:

  1. Change Runtime from Python 2.7 to Python 3.6. This will solve compatibility issues for the pickle protocol

from amazon-rekognition-video-analyzer.

moanany avatar moanany commented on July 18, 2024

Hi there,

I could not reproduce this error. The code for this loop is complete. This statement, however, is completed on a new line. Could this be the cause in your case?

Thanks,
Moataz

from amazon-rekognition-video-analyzer.

adrianmelic avatar adrianmelic commented on July 18, 2024

Maybe you are using Python 3.
That was my mistake.

from amazon-rekognition-video-analyzer.

moanany avatar moanany commented on July 18, 2024

@marioalfaro75 Closing this issue. Please post any updates/questions and I'll re-open.

from amazon-rekognition-video-analyzer.

poornimasivakumar avatar poornimasivakumar commented on July 18, 2024

Hi @adrianmelic @moanany
I'm getting the same issue.
C:\face>pynt -l Traceback (most recent call last): File "c:\python36\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Python36\Scripts\pynt.exe\__main__.py", line 9, in <module> File "c:\python36\lib\site-packages\pynt\_pynt.py", line 295, in main build(sys.argv[1:]) File "c:\python36\lib\site-packages\pynt\_pynt.py", line 48, in build module = imp.load_source(path.splitext(path.basename(args.file))[0], args.fi le) File "c:\python36\lib\imp.py", line 172, in load_source module = _load(spec) File "<frozen importlib._bootstrap>", line 684, in _load File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 674, in exec_module File "<frozen importlib._bootstrap_external>", line 781, in get_code File "<frozen importlib._bootstrap_external>", line 741, in source_to_code File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "build.py", line 25 print 'zipping %s as %s' % (os.path.join(dirname, filename), ^ SyntaxError: invalid syntax

@adrianmelic how did you fix it?

Thanks a ton!

from amazon-rekognition-video-analyzer.

adrianmelic avatar adrianmelic commented on July 18, 2024

@poornimasivakumar I just used Python 3 and not Python 2.7.

from amazon-rekognition-video-analyzer.

sujithaperumal avatar sujithaperumal commented on July 18, 2024

hi @adrianmelic I'm using python 3.7 and I still the same issue. Any help would be appreciated. Thanks!

from amazon-rekognition-video-analyzer.

adrianmelic avatar adrianmelic commented on July 18, 2024

Sorry @sujithaperumal it has been so long that I don't even remember this issue :(

from amazon-rekognition-video-analyzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.