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.

Issues starting and importing huey from different folder

See original GitHub issue

I have this folder structure.

huey_test huey_test/config huey_test/tasks

I modified to import like the following…

from config.config import huey
from tasks.tasks import count_beans

I would expect this to work but I get “ImportError: cannot import name ‘huey’” when running huey_consumer.exe main.huey.

If I leave the in the same folder as the main but move tasks it works by doing…

from config import huey
from tasks.tasks import count_beans

How can I import everything appropriately in a different folder structure?

Issue Analytics

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

github_iconTop GitHub Comments

vaskokjcommented, Jul 5, 2017

I apologize. I see what I did wrong. Nothing was wrong with my imports in the actual python code, but what was being sent to as the parameters.

I had:

C:\Users<username>Documents\dev\huey_test> python "C:\Program Files\Anaconda3\Scripts\" **hueytest\main.huey**

I thought you were looking for an actual PATH to the object and not the object itself. So instead of hueytest\main.huey I should have sent hueytest.main.huey as the parameters.

This is for anyone else that runs into the same problem.

pBogeycommented, Jan 14, 2020

I’m sorry but this isn’t the best place to ask this type of question. Try StackOverflow. The huey docs are pretty clear on how to set things up:

And at the end of the day it’s just Python and the way the import statement works…

I’m a beginner and I came here being tired of trying to configure celery with Django. I’m having a hard time understanding how to run a simple taks with Huey also, so I’m either too dumb, or the documentation is not clear enough. in this issue you said you’re not going to repeat yourself. That’s actually the problem with the docs, I believe. In the Django section, it assumes the reader already knows how to use huey standalone, while I don’t really care about that. I just want to plug it into my Django app and run tasks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where is the huey consumer configuration? - Stack Overflow
When I run main.Configuration it returns Unable to import "main" . Huey have this issue written in their common pitalls too, ...
Read more >
Consuming Tasks — huey 2.4.4 documentation - Read the Docs
Run from the directory your config module is in. I use supervisord to manage my huey process, so I set the directory...
Read more >
Chapter 1. Importing data to Directory Server
When you start an import operation, Directory Server first removes all existing data from the database and, subsequently, imports the data from the...
Read more >
Import preferences in Final Cut Pro - Apple Support
From folders: Creates a Keyword Collection for each folder in the files you're importing. Select this option to preserve the file organization that...
Read more >
Export and import canvas app packages - Power Apps
This feature allows you to export an app from one environment and import it to another. When exporting and importing canvas app packages, ......
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 Post

No results found

github_iconTop Related Hashnode Post

No results found