Hi

I installed the module, and it work just fine, but i notice some duplicate content, and no related content as i can see in your demo, i launch my french web site at www.biladi.info

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SeanBannister’s picture

I would say it's probally because you didn't currectly install the python dependencies, I had a similar problem http://drupal.org/node/290298

toma’s picture

I contact the server administrator and everything its installed correctly, what i have to type to see if its installed correctly, my server is CENTOS Enterprise 4.6 i686

kyle_mathews’s picture

On the command line type python to enter the python interactive interpreter.

Then there type "from Pycluster import *"

If that doesn't fail, then Pycluster *should* be installed correctly.

toma’s picture

Thanks for your reply, thats what i get :

[root@server ~]# python
Python 2.4.3 (#1, Feb 23 2008, 08:24:54)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Pycluster import *
>>>
kyle_mathews’s picture

It seems that Pycluster and Numeric then are installed correctly.

If your still not seeing clusters there are a few other possible reasons. Try keep running cron multiple times. It can take many cron runs to download new content from all your feeds (handy tip -- navigate to /admin/content/feed/list -- there you can see the last time each feed was updated).

Another possible problem is there might just not be any memes. If you have too few feeds and/or content from your feeds are unrelated, then memetracker will (correctly) not display any feeds.

toma’s picture

I set cron to run every 10 minutes, and i am sure some articles have the same title and content,with no related, i can give admin access to my web site to see, if you want to take a look.

kyle_mathews’s picture

That might speed up debugging. Could I also have access to your database through phpmyadmin or something? That'd be really helpful as well.

toma’s picture

Hi, thanks for your help, i just contact you by drupal contact form, all the information you need

kyle_mathews’s picture

FileSize
2.72 KB

Huh. Everything looks fine in your database and on your website. Copy the attached file to your webserver, remove the "_.txt" extension and run python cluster.py

This file is an exact copy of the python script in Memetracker that does the interfaces with the clustering library except it will use dummy data rather than live data from Memetracker. If this script runs properly, then Pycluster is installed correctly and something else in the code is wrong. If it fails, then either Pycluster or Python Numeric is installed incorrectly.

The output should be:

Cluster output:
9,8,0.0859780715517;3,2,0.121742078872;6,1,0.235191106376;10,-2,0.474667173546;-1,4,0.514123907524;7,-3,0.550835588735;
toma’s picture

Hi this what i get

[root@server ~]# python cluster.py
Cluster output:
9,8,0.0859780715517;3,2,0.121742078872;6,1,0.235191106376;10,-2,0.474667173546;-                                1,4,0.514123907524;7,-3,0.550835588735;
kyle_mathews’s picture

Weird. It seems everything seems to be working correctly. . . I'm confused now as to what the problem could be. I'm going to be flying back to the states tomorrow. In a few days I'll have time to investigate deeper to where in the code the problem could be.

toma’s picture

Thanks for your help

kyle_mathews’s picture

Toma,
I think this is why you're having trouble. It seems that Pycluster has changed it's dependency from Python-Numeric to Python-Numpy. See this issue: http://drupal.org/node/285854#comment-1008043

Try installing Python-numpy and tell me if that fixes the issue.

xorsyst’s picture

Hi. I'm having a similar issue. (python related im sure as this is a new box). Both pycluster and numpy have been installed. I have a feeling its a simple fix, however I am at a loss. When I do the first pycluster test command, I get:

xorsyst@ubuntu:~/public_html$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Pycluster import *
>>>

However, when I run the test cluster.py script from above, I get:

xorsyst@ubuntu:~/public_html$ python cluster.py
Traceback (most recent call last):
File "cluster.py", line 39, in
y = array(p,'d')
NameError: name 'array' is not defined

No idea where to go. I'm curious, does memetracker still work with Pycluster 1.42 and Numpy? I am trying to find Pycluster 1.41 to see if its just a problem with the new version.

xorsyst’s picture

I found Pycluster 1.41, installed it and Numeric, and I still got the same error. However if i change the array line to:

y = Numeric.array(p,'d')

cluster.py ran fine. So I changed the line in memetracker's cluster.py and the clustering of memes worked fine as well.

kyle_mathews’s picture

Here's the solution actually to the problem. The new Pycluster requires we import numpy in the memetracker script. Add import numpy to the top of your script and it should work. I need to get a new version of Memetracker out there with the change.

vinayras’s picture

There is no need to import numpy - because we are already using from Pycluster import * to import all packages

Changing 

 y = array(p,'d')

to 

 y = numpy.array(p,'d')

Working for me.

I am using
numpy-1.2.0
Pycluster-1.43

Thanks
Vinay

bluno’s picture

Component: User interface » Code
Assigned: toma » Unassigned

Hi all.

I've been playing with Memetracker for the last few days, and I'm not seeing related content either.

I have run the cluster.py_.txt test, and all is good on the Python installation.

I changed the array line in cluster.py in the memtracker module.

I added 'import numpy' to cluster.py.

still no related content.

I am using numpy-1.2.0 and Pycluster-1.43.

Thanks!

kyle_mathews’s picture

Whoops, I gave the wrong import statement above. Try from numpy import * instead of import numpy in cluster.py.

bluno’s picture

Thanks Kyle. I made this change, but still no luck.

Is there any other kind of test I can run to try to pinpoint the problem?

Thanks for your help!

kyle_mathews’s picture

Check if your file system in Drupal is working. The clustering won't work with out the file directory (data used in clustering is stored there for the Python script to read in).

bluno’s picture

Hey Kyle :
Here is the File system info from 'admin/reports/status':
Writable (public download method)

kyle_mathews’s picture

Well -- it's not that then. . . :) Do you mind giving me admin access to your site for a bit so I can look around? Just email me through my contact form.

SamRose’s picture

What should we be seeing if it is working properly? I just get a list of fed items at memetracker/1 no real way to know what is related to what, if anything (can provide screenshot if needed)

dejbar’s picture

I have also installed numpy, added 'from numpy import *' and 'y = numpy.array(p,'d')'. The example cluster.py_.txt file works for me withthe desired output (after the changes) but still there is no clustering.

kyle_mathews’s picture

dejbar -- sorry for not getting back to you earlier. Are you still having troubles with clustering?

vssaokar’s picture

I am also running into the same issue. I see no clustering. here's the output from the test script,

python cluster.py
Cluster output:
9,8,0.0859780715517;3,2,0.121742078872;6,1,0.235191106376;10,-2,0.474667173546;-1,4,0.514123907524;7,-3,0.550835588735;

How can I debug this issue?

pacrossley’s picture

I believe I'm having a similar issue: all 'appears' to be working (following Ubuntu Python instructions) but I can't tell what content is related to what other content. By lowering the pickiness, running cron and refreshing I can see a list of memes on the /memetracker/1 page, but I'm clueless as to how memetracker is displaying like-content.
Does there exist a step-by step config/admin or user guide? How about a bare-bones fresh D6 install with the required modules installed that we could take a peek at to establish just what we should be seeing?
Thanks for all of the work to date done on this module...I know it'll be supremely handy!

newsio’s picture

Same issue here. Ran the test (after Kyle's help here: http://drupal.org/node/333326 -- thanks!) and got the correct result after running cluster_test.py.

But clusters aren't appearing in memebrowser/1. I first ran cron about three or four times. Then I tried changing the pickiness setting down from 90 to 10, and increasing the number of memes from 10 to 15. There were five new memes added, but no change in the existing order, and still no clustering.

I then added about five more feeds (total now 15, with 159 items being brought in by Feedapi each time I run cron) which reshuffled the items on memebrowser/1 and added about seven or eight new memes. No clustering still, and two memes (one in the #1 position, and one in the number 5 position) were covering the same thing -- i.e., they should have clustered, but didn't Raised the pickiness back to 90, and ran cron yet again, but still no change.

What should I try next? I'd really love to get this working ....

Thanks

Ian

kyle_mathews’s picture

Ian - can you post a screenshot of what you're seeing?

newsio’s picture

Hello Kyle. Screenshot attached. The names running horizontally across the top of the screen are the sources I am using -- mostly mainstream business news sites. The five memes include a duplicate topic in the #1 and #5 slots -- the NYT and WSJ articles about Rattner stepping down.

I can include screenshots of anything else that might help you diagnose the problem, too ... just let me know.

Thanks

Ian

SamRose’s picture

I am also to the point where http://drupal.org/node/299632#comment-1812382 above is. Screenshot represents my output as well

SamRose’s picture

FileSize
336 bytes

file that memetracker is writing to files dir is attached

SamRose’s picture

after figuring out that I need mysql5 I got that going on another server and now memetracker_data.txt does indeed have soem data

But, now I have Fatal error: Call to a member function get_timestamp() on a non-object in /var/www/mysite/sites/all/modules/memetracker/machine_learning_api.inc on line 585

So, I will dig into machinelearning api

Anonymous’s picture

anyone figure this out? im stuck at the get_timestamp issue as well and am trying to debug it. basically for me there is no related items in the content object array so when get_timestamp is called, that $content variable is not even a content object.

also for the record my meme tracker .txt file in the files dir does contain data. everything has data but up to this point.

bflora’s picture

Am in the same position. I'm getting positive results back from the test, so I believe I've got the python stuff set up right, but I'm not getting any clusters. Anyone get this figured out?