Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4562220
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:11:07+00:00 2026-05-21T18:11:07+00:00

In the process of creating an auto-updater for my program, and I’m having trouble

  • 0

In the process of creating an auto-updater for my program, and I’m having trouble successfully downloading an .exe file.

What I was doing was something like this:

import urllib

url = '--insert-url--'

f = urllib.urlopen(url)
file = f.read()
f.close
f2 = open('download.exe', 'w')
f2.write(file)
f2.close

I encountered no errors while downloading, but when I try to run the execution, I get the following error:

The version of this file is not
compatable with the version of Windows
you’re running. Check your computer’s
system information to see whether you
need an x86(32-bit) or an x64 (64-bit)
version of the program, and then
contact the software publisher.

I uploaded the execution myself and it worked fine before.

I also tried some various other methods for downloading that I found, which resulted in the same error, and I also tried uploading to different sites to make sure that wasn’t it.

Is there a special way I need to do this?

EDIT:

I did some further testing with the download. I ran the program (I’m using what Spencer posted now) on a different computer — a 32-bit system. (Mine is a 64-bit.) I don’t get the error on that computer, but when I run the program, the command line comes up, as it is a command-line style .exe that I’m using as my test download, but the blinking white entry bar thing just bounces all over the place before I have to end the program, so something is obviously getting corrupted.

Also, would the downloading process be possible with a Batch file? This would almost be easier as the program is going to have to restart to begin using the new update anyway, as it is using an entirely new .exe. (I’m going to use py2exe for making the program an .exe.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T18:11:08+00:00Added an answer on May 21, 2026 at 6:11 pm

    According to the official python docs for urllib:

    One caveat: the read() method, if the
    size argument is omitted or negative,
    may not read until the end of the data
    stream; there is no good way to
    determine that the entire stream from
    a socket has been read in the general
    case.

    an alternative from the same library would be

    import urllib
    
    url = '--insert-url--' 
    
    filename = 'download.exe'  
    urllib.urlretrieve(url, filename)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the process of creating a site that i would like to
I'm in the process of creating an app. I'd like to have a pared
I am in the process of creating a Wizard to help my organization auto
In the process of creating a user interface code from UI file Qt creates
In the process of creating a Desktop version of my Web app, I'd like
I'm in the process of creating a header section for a webapp. I'm having
I am in process of creating a software for dumping plain text of whatever
Suppose that a process is creating a mutex in shared memory and locking it
I am in the process of creating an iPhone app that requires to interact
I'm in the process of creating a coverflow view for android, but I'm running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.