googleapiclient.errors.MediaUploadSizeError: Media larger than 26214400 - google-api-client

i'm using the Google-api-python-client to upload some emails to a google groups.
the upload works fine until i got this error while uploading... .
File "/Users/xxxxx/Downloads/pythonClientLibrary/google-api-python-client-1.8.3/googleapiclient/discovery.py", line 861, in method
raise MediaUploadSizeError("Media larger than: %s" % maxSize) googleapiclient.errors.MediaUploadSizeError: Media larger than: 26214400
is there any way to change/increase the value of the 'maxSize' variable to be able to upload mails with size larger than 26mb ?

apparently 25MB is the max size of a message, that is allowed to be transferred using the Groups Migration API
so in my code, i checked if the msg size is > 25mb then ignore this msg.
message_size = msg.as_string().__sizeof__()
if message_size >= 26214400:
print('Message {} - Size {} - subject : {} - from: {} - to: {}'.format(i, message_size, msg['subject'], msg['from'], msg['to']))
continue

Related

How can I increase system_ext partition in AOSP?

I was trying to add a .so file into /system/lib with PRODUCT_COPY_FILES, but once I try to build it it fails with this error:
ExternalError: Failed to run command '['lpmake', '--metadata-size', '65536', '--super-name', 'system', '--metadata-slots', '2', '--auto-slot-suffixing', '--device', 'system:2952790016', '--device', 'vendor:805306368', '--device'
, 'product:314572800', '--group', 'google_dynamic_partitions:4069523456', '--partition', 'system:readonly:2344202240:google_dynamic_partitions', '--image', 'system=/home/markus/EPhone/ethOS/out/target/product/blueline/obj/PACKAG
ING/target_files_intermediates/lineage_blueline-target_files-eng.markus/IMAGES/system.img', '--partition', 'vendor:readonly:452227072:google_dynamic_partitions', '--image', 'vendor=/home/markus/EPhone/ethOS/out/target/product/bl
ueline/obj/PACKAGING/target_files_intermediates/lineage_blueline-target_files-eng.markus/IMAGES/vendor.img', '--partition', 'product:readonly:1016426496:google_dynamic_partitions', '--image', 'product=/home/markus/EPhone/ethOS/o
ut/target/product/blueline/obj/PACKAGING/target_files_intermediates/lineage_blueline-target_files-eng.markus/IMAGES/product.img', '--partition', 'system_ext:readonly:266698752:google_dynamic_partitions', '--image', 'system_ext=/
home/markus/EPhone/ethOS/out/target/product/blueline/obj/PACKAGING/target_files_intermediates/lineage_blueline-target_files-eng.markus/IMAGES/system_ext.img', '--sparse', '--output', '/home/markus/EPhone/ethOS/out/target/product
/blueline/obj/PACKAGING/target_files_intermediates/lineage_blueline-target_files-eng.markus/OTA']' (exit code 70):
lpmake I 12-25 19:38:11 10456 10456 builder.cpp:1031] [liblp]Partition system will resize from 0 bytes to 2344202240 bytes
lpmake I 12-25 19:38:11 10456 10456 builder.cpp:1031] [liblp]Partition vendor will resize from 0 bytes to 452227072 bytes
lpmake I 12-25 19:38:11 10456 10456 builder.cpp:1031] [liblp]Partition product will resize from 0 bytes to 1016426496 bytes
lpmake E 12-25 19:38:11 10456 10456 builder.cpp:620] [liblp]Partition system_ext is part of group google_dynamic_partitions which does not have enough space free (266698752 requested, 3812855808 used out of 4069523456)
Not enough space on device for partition system_ext with size 266698752
How can I increase the space on system_ext, so I can include the .so file?
I guess you need to change BoardConfig file, similar to https://github.com/LineageOS/android_device_google_crosshatch/commit/155109c657c804ca14e4cbb78ddc2caf5bfeda46 but for BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE (just in case if you need to change BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE later).
FYI blueline is built on crossnatch product tree.

MATLAB H5 files cannot exceed 2GB

If I create a h5 file larger than 2GB, I get an error. Smaller than 2GB things work fine. I didn't think this filesize was a problem with the h5 format. This seems to not be a problem on my windows 8.1 machine, but is on my Ubuntu 20.04 machine.
MWE:
fname = 'tmp001.h5';
h5create(fname,'/DS1',[195 2048 1500],'DataType','single'); % doesn't work
h5write(fname,'/DS1',1,[1 1 1],[1 1 1]);
fname = 'tmp002.h5';
h5create(fname,'/DS1',[195 2048 1400],'DataType','single');% doesn't work
h5write(fname,'/DS1',1,[1 1 1],[1 1 1]);
fname = 'tmp003.h5';
h5create(fname,'/DS1',[195 2048 1300],'DataType','single');% does work
h5write(fname,'/DS1',1,[1 1 1],[1 1 1]);
This only seems to be a problem if I give it only a segment of the data set, and even then it works providing the size of the data is more than 2^14! See files 4 and 5:
fname = 'tmp004.h5';
h5create(fname,'/DS1',[536886273],'DataType','single');% does work
h5write(fname,'/DS1',rand(536886273,1)); % filesize > 2gb but length > 2^14
fname = 'tmp005.h5';
h5create(fname,'/DS1',[536886273],'DataType','single');% doesn't work
h5write(fname,'/DS1',1,1,1); % filesize > 2gb but length < 2^14
fname = 'tmp006.h5';
h5create(fname,'/DS1',[536886272],'DataType','single');% does work
h5write(fname,'/DS1',1,1,1); % length > 2^14 but okay since filesize < 2gb
Error:
Warning: The following error was caught while executing 'H5ML.id' class destructor:
Error using hdf5lib2
The HDF5 library encountered an error and produced the following stack trace information:
H5FD_truncate driver truncate request failed
H5F_dest low level truncate failed
H5F_try_close problems closing file
H5O_close problem attempting file close
H5D_close unable to release object header
H5I_dec_app_ref can't decrement ID ref count
H5I_dec_app_ref_always_close can't decrement ID ref count
H5Dclose can't decrement count on dataset ID
Error in H5ML.id/close (line 47)
H5ML.hdf5lib2(obj.callback, obj.identifier);
Error in H5ML.id/delete (line 36)
obj.close();

Codeigniter Upload File Sometimes Not Working

I have a website with an upload profile photos for users.
First Try
When I try to upload a small size image, the upload was succeed.
This file property :
Size : 500 KB
Width : 900
Height : 900
Type : jpg
Second Try
When I try to upload a large iamge, I got error message :
The uploaded file exceeds the maximum allowed size in your PHP configuration file.
This file property :
Size : 7,2 MB
Width : 5200
Height : 3500
Type : JPG
This is my config file in my controller :
$config['upload_path'] = "./assets/gambar/pengguna/";
$config['allowed_types'] = 'gif|jpg|jpeg|png';
$config['max_size'] = 25000;
$config['max_width'] = 7000;
$config['max_height'] = 7000;
I tried to change max_size, max_width, and max_height to 0. But I still get bthe same problem.
Refrence to set it 0 to make it no limit from :
https://www.codeigniter.com/user_guide/libraries/file_uploading.html

Cortex-M3 heap-stack organization using keil

Trying to run blinky sample for Atmel sam3s and inspecting the stack pointer...
SP has the value 0x20000238 at the start of main function which is equal too Ram base + RW + ZI for this sample.
The base RAM address for this chip is : 0x20000000
Total ram size is: 0x10000
I expected the sp to be initialized on 0x20010000 and coming down.
Can anyone explain if I am wrong or not?
As Pait said (he/she should have answered the question so I could accept it, I think),
I was wrong to think the stack will be placed at the end of RAM by default. But I think it is wise to make it be placed there.
This is how I do it for my SAM3S micro, by changing the scatter file
LR_IROM1 0x00400000 0x00080000 { ; load region size_region
ER_IROM1 0x00400000 0x00080000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20000000 0x00010000 { ; RW data
.ANY (+RW +ZI)
}
RW_STACK 0x2000C000 UNINIT 0x4000 { ; STACK data
*.o (STACK)
}
}
RAM base = 0x20000000
Total RAM = 64 kb
Intended stack size = 16 kb

Live Stream (of some channel) Play through Roku Box

I were trying to join igmp live streaming and play it in roku box. But it didn't worked.
Is it that we can not join multicast streaming in Roku boxes ?
If it is possible to do via HLS, then what could be the solution ?
I tried the reference in github at link : https://github.com/thetrime/trimeplay/blob/master/source/trimeplay.brs
Please refer the another code I were using as reference :
function SetupJoin()
ssdpAddress = "239.60.60.7:6607"
ssdpPort = 6607
timeout = 300 * 60 * 1000
groupAddr = CreateObject("roSocketAddress")
groupAddr.setAddress(ssdpAddress)
groupAddr.setPort(ssdpPort)
listenAddr = CreateObject("roSocketAddress")
listenAddr.setPort(ssdpPort)
listenAddr.setAddress("0.0.0.0")
listen = CreateObject("roDatagramSocket")
listen.setReuseAddr(true)
listen.setAddress(listenAddr)
result = listen.joinGroup(groupAddr)
listen.setMessagePort(canvas.GetMessagePort())
listen.notifyReadable(true)
numResponses= Wait_SSDP(listen, timeout)
? "Result : " result
? "SSDP Listen got"; numResponses; " responses"
end function
function Wait_SSDP(socket as Object, timeout as Integer) as Integer
numResponses = 0
elapsed = CreateObject("roTimespan")
remaining = timeout - elapsed.totalMilliseconds()
while remaining > 0
msg = wait(remaining, socket.getMessagePort())
if type(msg)="roSocketEvent"
if socket.isReadable()
results = socket.receiveStr(255)
print "SSDP Listen gets from "; socket.getReceivedFromAddress().getAddress(); ":"
print results
numResponses = numResponses + 1
end if
else
exit while 'enter code here
end if
remaining = timeout - elapsed.totalMilliseconds()
end while
return numResponses
end function
I'm not going to say that what you are trying to do is completely impossible, but it is impractical.
You would have to do something sort of like this:
Use roStreamSockets to collect the UDP data and write it to tmp:/ as an h.264 video file, probably as HLS chunks, then point the video playback component at it via .m3u8 files you also write on the fly. This would have to be done in Brightscript. I'm not sure that Brightscript is fast enough to do this. I'm not saying it is impossible to do it, but Roku does not natively play multicast or other UDP video stream formats.
The only officially supported video formats for live broadcast are HLS and Microsoft Smooth.