A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/328391.html below:

Linux to Windows porting question

Linux to Windows porting question Linux to Windows porting questionPeter Otten __peter__ at web.de
Tue Sep 6 14:57:12 EDT 2005
SHELTRAW, DANIEL wrote:

> I am trying to port some code to Windows that works fine under Linux. The
> offending line is:
> 
>     blk = fromstring(f_fid.read(BLOCK_LEN),
>     num_type).byteswapped().astype(Float32).tostring()
> 
> The error I get is:
> 
>     ValueError: string size must be a multiple of element size
> 
> Does anyone have an idea where the problem might be? BLOCK_LEN is
> specified in bytes and num_type is Int32.

Is the file f_fid opened in binary mode?

Peter


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4