Error when running example: AttributeError: 'module' object has no attribute '__file__'
See original GitHub issueI’m testing toil on python 2.7.6, and it bugs out after this line:
from toil.job import Job
def helloWorld(message, memory="2G", cores=2, disk="3G"):
return "Hello, world!, here's a message: %s" % message
j = Job.wrapFn(helloWorld, "woot")
Error seems to be getting the file attribute from the module:
>>> j = Job.wrapFn(helloWorld, "woot")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/vanessa/.local/lib/python2.7/site-packages/toil/job.py", line 280, in wrapFn
return FunctionWrappingJob(fn, *args, **kwargs)
File "/home/vanessa/.local/lib/python2.7/site-packages/toil/job.py", line 2678, in __init__
self.userFunctionModule = ModuleDescriptor.forModule(userFunction.__module__).globalize()
File "/home/vanessa/.local/lib/python2.7/site-packages/toil/resource.py", line 363, in forModule
filePath = os.path.abspath(module.__file__)
AttributeError: 'module' object has no attribute '__file__'
This is toil toil-3.2.1, python 2.7.6, on ubuntu. It produces the same error whether I do a local install with --user, or install to system with sudo. Is the example up to date with the current version?
┆Issue is synchronized with this Jira Story ┆Issue Number: TOIL-88
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
'module' object has no attribute 'file'' when using oauth2client ...
In original sample. https://developers.google.com/google-apps/calendar/quickstart/python#step_3_set_up_the_sample. missing import entry:
Read more >AttributeError: 'module' object has no attribute 'main'
Module object has no attribute error : Python. An attribute in Python means some property that is associated with a particular type of...
Read more >[Solved] AttributeError: 'module' object has no attribute
Click here to subscribe - https://www.youtube.com/channel/UCeVMnSShP_Iviwkknt83cww▻Instagram ...
Read more >AttributeError: 'module' object has no attribute 'root'
Do you know what version of python you're running? You can check with “python --version”. Dedalus requires Python 3, which is normally invoked...
Read more >Error AttributeError module object has no attribute tests
To validate your test case just try import the test case file in python console. Example: from project.apps.app1.tests import *. Hope it helps!!...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
lol! Well when I opened this issue in 2016 you most definitely did 😃 Thanks for the err, speedy response?
We no longer run python2.7.