1
1

I'm having troubles with getting into sximporter page at my local OSQA instance.

I started some debugging and found out that in fact import of an appropriate module didn't run.

In forum.urls there's a call to get_modules_script('urls') which tries to get a list of <forum_module>.urls scripts.

The body of get_modules_script function is following (as in trunk):

def get_modules_script(script_name):
    all = []

for m in MODULE_LIST:
        try:
            all.append(__import__('%s.%s' % (m.__name__, script_name), globals(), locals(), [m.__name__]))
        except ImportError, e:
            #print repr(type(e)) + m.__name__ + ":" + str(e)
            pass
        except:
            import traceback
            msg = "Error importing %s from module %s: \\n %s" % (
                script_name, m.__name__, traceback.format_exc()
            )
            logging.error(msg)

return all

In fact there is forum_modules.sximporter on the MODULE_LIST and whene it comes to import it with a call:

__import__('forum_modules.sximporter.urls', globals(), locals(), ['forum_modules.sximporter'])

I get the ImportError that "No module named urls" (i.e. facebookauth module does import without an error) and there is urls.py file under forum_modules/sximporter path.

Am I missing sth? Why it's not importing?

asked 03 Jan '11, 00:34

rafek's gravatar image

rafek
1813613
accept rate: 0%


There is in fact a problem we just recently found out. Two actually, one is that we ignore ImportErrors, which should happen when there was no module under the name we're looking. But we forgot that those ImportError may also be thrown from the inside of the specified module. So there's nothing logged.

The second problem is probably causing your module not to load, and I just pushed a fix that will probably help you. Please give it a go, updating to the latest version.

link

answered 03 Jan '11, 00:54

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.8k65975
accept rate: 52%

Thanks, that has helped! Now I've got problem with importing data from SE, but that's another issue ;)

(03 Jan '11, 01:03) rafek
2

Is this update containing the sximporter "fix" later than the fantasy-island-0.9.0-beta3 version? I'm also having problems accessing sximporter and I'm using that version from the Webfaction installation script

(24 Jul '11, 20:28) joe
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×24
×18
×16

Asked: 03 Jan '11, 00:34

Seen: 517 times

Last updated: 24 Jul '11, 20:28

powered by OSQA