analyze-python-sdk icon indicating copy to clipboard operation
analyze-python-sdk copied to clipboard

Could you make a video or explanation on how to use this? Because I’m not understanding how exactly it works.

Open Oh-Turry opened this issue 3 years ago • 6 comments

If not please help with this error, I've used your example for send_file_file()


File "c:\Users\Turry\Turry's Cloud\test_lounge\python\test.py", line 26
    send_file_with_wait("C:\Users\Turry\Documents\Optimizations\ImproveConnection.reg")
                                                                                      ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

Oh-Turry avatar Dec 31 '21 11:12 Oh-Turry

Looks like you didn't escape the backslashes, you can add r before the path.

davidt99 avatar Jan 01 '22 19:01 davidt99

Looks like you didn't escape the backslashes, you can add r before the path.

Yeah but it still doesn't work

Oh-Turry avatar Jan 02 '22 05:01 Oh-Turry

Can you share the new error and the code? Also, did you see the examples directory we have?

davidt99 avatar Jan 02 '22 08:01 davidt99

Traceback (most recent call last):
  File "c:\Users\Turry\Turry's Cloud\test_lounge\python\test.py", line 24, in <module>
    send_file_with_wait(*sys.argv[1:])
TypeError: send_file_with_wait() missing 1 required positional argument: 'file_path'

Oh-Turry avatar Jan 02 '22 16:01 Oh-Turry

I added the r in my code at the beginning of the argument

Oh-Turry avatar Jan 02 '22 16:01 Oh-Turry

You posted the output, not the code. if you want to analyze a file on your computer, try maybe this snippet:

from intezer_sdk import api
from intezer_sdk.analysis import Analysis

api.set_global_api('<api_key>')
analysis = Analysis(file_path=r'C:\Users\Turry\Documents\Optimizations\ImproveConnection.reg')
analysis.send(wait=True)
pprint(analysis.result())

davidt99 avatar Jan 02 '22 17:01 davidt99

I'm closing this issue for now, let me know if you have more issue.

davidt99 avatar Aug 03 '23 09:08 davidt99