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 7620025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:50:16+00:00 2026-05-31T03:50:16+00:00

import platform, urllib2 ip = urllib2.urlopen(http://whatismyip.org).read() os = str(platform.win32_ver()[0]) os2 = str(platform.win32_ver()[1]) os3 =

  • 0
import platform, urllib2

ip = urllib2.urlopen("http://whatismyip.org").read()
os = str(platform.win32_ver()[0])
os2 = str(platform.win32_ver()[1])
os3 = str(platform.win32_ver()[2])
arch = str(platform.machine())
processor = str(platform.processor())

print """
            System data collector
===============================================================
Operating system: $s ($s [%s])
Architecture: %s
Processor: %s

Public IP Address: %s
""" % (os, os2, os3, arch, processor, ip)

That code throws a TypeError: not all arguments converted during string formatting when run. Can anyone tell me whats wrong with it? Thanks.

  • 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-31T03:50:17+00:00Added an answer on May 31, 2026 at 3:50 am

    The line

    Operating system: $s ($s [%s])
    

    should be

    Operating system: %s (%s [%s])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I went through http://platform.netbeans.org/tutorials/nbm-quick-start.html#lookup , but when I define the dependencies, it doesn't get
following the tutorial at http://platform.netbeans.org/tutorials/nbm-quick-start.html#lookup Right-click the TextFilter module, choose Properties, and use the
import urllib import re import os search = (raw_input('[!]Search: ')) site = http://www.exploit-db.com/list.php?description=+search+&author=&platform=&type=&port=&osvdb=&cve= print
import org.joda.time.LocalDate; public class Test { public static void main(String[] args) { long time=System.currentTimeMillis();
import httplib2 from urllib import urlencode h = httplib2.Http() h.add_credentials('zackster@gmail.com', 'PassWord') data = dict(key=ThisIsMyApiKeyICopiedAndPastedIt)
If I do like this in the python prompt: import platform platform.system() I get
I want to import a project from https://android.googlesource.com/platform/packages/apps/DeskClock into Eclipse. What steps do I
import sys print (sys.platform) print (2 ** 100) input('press Enter to exit') Suppose I
I use the following code to listen to global key events: Win32HookManager.java import com.sun.jna.platform.win32.Kernel32;
What are the possible return values from the following command? import sys print sys.platform

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.