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

  • Home
  • SEARCH
  • 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 8954411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:18:49+00:00 2026-06-15T14:18:49+00:00

I want to import a module Devices.py from package abc.devices, but it gives me

  • 0

I want to import a module Devices.py from package abc.devices, but it gives me an import error : No Module named abc. Here dev is a one package in which contains the module Devices.py. below is the code of my monkeyrunner file.

import os
import sys
import subprocess
import unittest
import commands
from ConfigParser import ConfigParser
from abc.Devices import Devices
dev = Devices()
dev.gDevice()

from com.android.monkeyrunner import MonkeyDevice, MonkeyRunner, MonkeyImage
from com.dtmilano.android.viewclient import ViewClient, View
  • 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-06-15T14:18:51+00:00Added an answer on June 15, 2026 at 2:18 pm

    monlyrunner is not reading PYTHONPATH so you have to do this before importing your modules (as ViewClient’s examples do):

    # PyDev sets PYTHONPATH, use it
    try:
        for p in os.environ['PYTHONPATH'].split(':'):
            if not p in sys.path:
                sys.path.append(p)
    except:
        pass
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to import org.apache.commons.io but i'm getting this error: [info] Compiling 1 Java
I want to import a class from python module. The module contains multiple classes
I want to import 100 million entries from a text file (each row is
i want to import csv file to mysql database. the upload was success. but
I have a method I want to import from a DLL and it has
Hi I have an INFILE I want to import, but the dates are of
I have a SimpleXMLElement Object that I want to import with PHP. But it
In Python, if you want to programmatically import a module, you can do: module
I have two related Python 'import' questions. They are easily testable, but I want
Say I want to test this module: import osutils def check_ip6(xml): ib_output = osutils.call('iconfig

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.