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
Upload assets not working using Python #32
Comments
Have a look at
https://spectrum.chat/frame-io/help/file-upload-error-with-the-frameio-python-client~f151149c-ec96-470e-9716-dd12abb633a9
…On Thu, 9 Apr 2020 at 10:59, Rajiv Sharma ***@***.***> wrote:
I am using Python 3.7 on windows 10.
from frameioclient import FrameioClient
import os
client = FrameioClient("MY_TOKEN_HERE")
mov = "D:/Development/rc/frameio/a.mp4"
filesize = os.path.getsize(mov)
# Create a new asset.
asset = client.create_asset(
parent_asset_id="MY_ASSET_ID",
name="MyVideo.mp4",
type="file",
filetype="video/mp4",
filesize=filesize
)
# Upload the file at the target asset.
file = open(mov, "rb")
client.upload(asset, file)
When I am trying to upload .mp4 file using python file getting error.
D:\Development\rc\frameio\venv\Scripts\python.exe
D:/Development/rc/frameio/demo01.py
Traceback (most recent call last):
File "D:/Development/rc/frameio/demo01.py", line 20, in
client.upload(asset, file)
File
"D:\Development\rc\frameio\venv\lib\site-packages\frameioclient\client.py",
line 238, in upload
uploader.upload()
File
"D:\Development\rc\frameio\venv\lib\site-packages\frameioclient\upload.py",
line 33, in upload
proc.start()
File "C:\Program Files\Python37\lib\multiprocessing\process.py", line 112,
in start
self._popen = self._Popen(self)
File "C:\Program Files\Python37\lib\multiprocessing\context.py", line 223,
in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Program Files\Python37\lib\multiprocessing\context.py", line 322,
in _Popen
return Popen(process_obj)
File "C:\Program Files\Python37\lib\multiprocessing\popen_spawn_win32.py",
line 89, in *init*
reduction.dump(process_obj, to_child)
File "C:\Program Files\Python37\lib\multiprocessing\reduction.py", line
60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: cannot serialize '_io.BufferedReader' object
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#32>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM2LJCAJ3QEV3JVBL3QIVTRLWE5PANCNFSM4MER745Q>
.
--
Kind regards,
Paul Niemandt
*mail *paul@niemandt.com *m**obile *076 171 6920 *s**kype *paul_niemandt
|
Its working now.
|
@vfxpandit @OxB03 I'm about to merge in a big update that should fix all the uploader woes as well as introduces more testing around python versions so that this doesn't happen in the future! I don't necessarily recommend using that |
I have now merged this into master and released |
I am using Python 3.7 on windows 10.
When I am trying to upload .mp4 file using python file getting error.
The text was updated successfully, but these errors were encountered: