Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109080

Re: ZipImportError: can't find module

From John Gordon <gordon@panix.com>
Newsgroups comp.lang.python
Subject Re: ZipImportError: can't find module
Date 2016-05-24 18:27 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <ni26fb$nrg$1@reader1.panix.com> (permalink)
References <1e511b73-e984-459c-9311-778888bcd6cc@googlegroups.com>

Show all headers | View raw


In <1e511b73-e984-459c-9311-778888bcd6cc@googlegroups.com> loial <jldunn2000@gmail.com> writes:

> What has been working for years suddenly has an error :

> zipimport.ZipImportError: can't find module 'mymodule'

How is the shell script executed?  Is it run interactively, or from a cron
job?

Are the permissions on the zipfile correct, and all parent directories?

How, specifically, are you importing the module?  Are you doing something
like this:

    zipfile = zipimport.zipimporter('file.zip')
    zipfile.load_module('mymodule')

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

ZipImportError: can't find module loial <jldunn2000@gmail.com> - 2016-05-24 00:49 -0700
  Re: ZipImportError: can't find module John Gordon <gordon@panix.com> - 2016-05-24 18:27 +0000

csiph-web