question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'module' object has no attribute 'create_agents'

See original GitHub issue

Hi there,

I am experiencing some errors while using ParlAI with Python 3.4.5 In particular I got the following exception:

[loading fbdialog data:cornell_movie/CornellMovie/train.txt]
Traceback (most recent call last):
  File "/tmp/asuglia/ParlAI/parlai/core/agents.py", line 429, in _create_task_agents
    create_agent = getattr(my_module, 'create_agents')
AttributeError: 'module' object has no attribute 'create_agents'

Another related exception is raised in this case:

Traceback (most recent call last):
  File "parlai_exporter.py", line 76, in <module>
    main(args)
  File "parlai_exporter.py", line 64, in main
    dataset = read_dataset_data(datasets[dataset_id])
  File "parlai_exporter.py", line 28, in read_dataset_data
    world = create_task(opt, agent)
  File "/tmp/asuglia/ParlAI/parlai/core/worlds.py", line 992, in create_task
    world = create_task_world(opt, user_agents)
  File "/tmp/asuglia/ParlAI/parlai/core/worlds.py", line 967, in create_task_world
    world_class, task_agents = _get_task_world(opt, user_agents)
  File "/tmp/asuglia/ParlAI/parlai/core/worlds.py", line 937, in _get_task_world
    task_agents = _create_task_agents(opt)
  File "/tmp/asuglia/ParlAI/parlai/core/agents.py", line 433, in _create_task_agents
    return create_task_agent_from_taskname(opt)
  File "/tmp/asuglia/ParlAI/parlai/core/agents.py", line 395, in create_task_agent_from_taskname
    task_agents = teacher_class(opt)
  File "/tmp/asuglia/ParlAI/parlai/tasks/cornell_movie/agents.py", line 26, in __init__
    super().__init__(opt, shared)
  File "/tmp/asuglia/ParlAI/parlai/core/teachers.py", line 832, in __init__
    super().__init__(opt, shared)
  File "/tmp/asuglia/ParlAI/parlai/core/teachers.py", line 401, in __init__
    cands=self.label_candidates(), **kwargs)
  File "/tmp/asuglia/ParlAI/parlai/core/teachers.py", line 495, in __init__
    self._load(data_loader, opt['datafile'])
  File "/tmp/asuglia/ParlAI/parlai/core/teachers.py", line 570, in _load
    for episode in self._read_episode(data_loader(datafile)):
  File "/tmp/asuglia/ParlAI/parlai/core/teachers.py", line 513, in _read_episode
    for entry, new in data_generator:
  File "/tmp/asuglia/ParlAI/parlai/core/teachers.py", line 920, in setup_data
    conv_id = int(line[:space_idx])

This happens when I try to use the Cornell Movie dialogue datasets. Seems to me that on Python 3.6 there are no problems.

Do you have any clues about this problem?

Cheers, Alessandro

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
alexholdenmillercommented, Apr 17, 2018

both should be fixed now, thanks for flagging!

0reactions
alexholdenmillercommented, Apr 17, 2018

thank you @fizzxed that’s reproing for me, I’ll fix it

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'module' object has no attribute - Stack Overflow
E.g. I had a module called commands which is also a Python library module. This proved to be difficult to track down as...
Read more >
[Solved] AttributeError: 'module' object has no attribute
Click here to subscribe - https://www.youtube.com/channel/UCeVMnSShP_Iviwkknt83cww▻Instagram ...
Read more >
Debugging AttributeError: 'module' object has no attribute 'core'?
I just figured it out myself. There was an error in numpy. Just installed it again and now it works.
Read more >
Python SPSS - 'module' object has no attribute 'submit' - IBM
Hello, I'm new here but I've been following the threads. When executing the following Python/spss code, I<br> get an Attribute Error - I...
Read more >
'module' object has no attribute 'CounterflowDiffusionFlame'
AttributeError : 'module' object has no attribute 'CounterflowDiffusionFlame'. I do not know how to solve those. It is the code provided as tutorial....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found