Not sure if I should be posting this here, but as I was following your guide, I reached step 4 and started adding RSS feeds. While the node was saved successfully, it didn't appear to fetch the feed contents. It resulted in the following error:

warning: Invalid argument supplied for foreach() in /usr/home/gfxunit/public_html/codeunit/sites/all/modules/feedapi/feedapi.module on line 1276.

Comments

BioALIEN’s picture

Title: Adding RSS feeds returns an error. » Adding RSS feeds returns an error

Another false alarm, this was triggered by the documentation. Way too many iteration of Feed and Feed Item and feed and feed item :)

I am testing this on shared hosting without root access. Therefore, I was unable to install Pycluster. I progressed through all the steps and I am unable to get it to work. When I get to Step 4, it doesn't appear to do anything. Having checked cron, it returns an error in memetracker.module line 80 dpm('inside memetracker_cron');

kyle_mathews’s picture

Title: Adding RSS feeds returns an error » Adding RSS feeds returns an error.

Yeah, this is really an issue for the Feedapi project. My one suggestion (I've never see this particular error before) is for you to check that you've installed either the "SimplePie Feed Parser" (and simplepie.inc) or the "Common Syndication Parser" modules. Those are what actually do the heavy lifting of turning the xml of RSS feeds into Drupal understandable content.

So check that issue, read closely again the README.txt file for Feedapi, then if things still aren't working, post an issue over in the Feedapi issue tracker.

Good luck!

kyle_mathews’s picture

re: issue 1 -- that's my fault. dpm() is a function from the devel module I use for debugging. Just delete the line, it doesn't do anything now. I thought I'd gotten rid of all of them for the release. . . but evidently not.

BioALIEN’s picture

Kyle, you're right. FeedAPI seems to be experiencing a lot of problems with the parsers:
#263341: Common syndication parser fails to parse some valid feeds

I've changed from Common Syndication Parser to SimplePie Feed Parser and now I'm back on track on following this. I don't have enough data to use the memetracker yet. However, I'll keep you posted on my progress.

Given that I can't install Pycluster, do we have another solution for people on shared hosting or people without root access?

kyle_mathews’s picture

I hadn't seen issue #263341 but I'd had problems with the Common syndication parser in the past. Feed parsing seems to be a non-trivial problem to solve.

Re: Pycluster -- yes there is a way top provide Pycluster for those on shared hosting/without root access. Pycluster is a python library which wraps a c library. The c library is what does the actual work of clustering. The problem now is the c library comes as source files so needs to be compiled for Pycluster to work.

I *think* it'd be possible to ship with Memetracker a pre-compiled version of Pycluster. We could compile versions for windows / Linux then do a check within the Python script for what OS is running and everything could "just work." But I really have no idea how to do that. If you or anyone else knows how to find all the files that the installation process of Pycluster creates scattered around the OS and pull them together into one directory so everything still works -- excellent. Contact me and we'll get this working. But in any case, I plan to put out a cry for help next week on this issue on g.d.o and the devel list to see if I can drum up help from a C expert.

I want this to work as a) I want Memetracker to be able to run on shared hosting and b) installation has too many steps. It should be simpler.

bonobo’s picture

For the first pass on this, I definitely recommend creating documentation that shows how to install pycluster (and Numeric), as opposed to putting time into assembling a prefab version of pycluster.

I also think that simplepie should be documented as the suggested parser.

My reasons:

1. Calculating memes requires a lot of resources -- I don't think that shared hosts will have the necessary resources to do this reliably (although admittedly I'm going by instinct, not benchmarks, here).

2. We have limited time to complete the project -- I'd rather prioritize code at this stage, with a precompiled pycluster being a "nice to have" that can be addressed later.

2a. it'd be a great community contribution to have someone else do the precompiled pycluster :)

3. I'd be concerned that a precompiled pycluster wouldn't work in all hosting environments, and it certainly wouldn't work in environments without python installed -- I don't know how many shared hosts support python by default. This gets back to the issue of a native php vs apython-based solution, but that's a longer discussion.

4. RE simplepie: it seems to work more effectively, in a broader range of environments. Let's push people in that direction, as it will save time.

I'd recommend setting this to "postponed" but that's Kyle's call.

kyle_mathews’s picture

I agree Bill -- I shouldn't put time right now into pulling together a precompiled version of Pycluster. I think what I will do is post an feature request here as a placeholder of sorts explaining the issue and what would need to be done to solve it.

The latest version of INSTALL.txt has instructions for installing Numeric and (better) instructions for installing Pycluster.

RE simplepie -- I agree. Let's push people that direction. I'll add a note in the INSTALL.txt file.

ahales’s picture

I tried to install Pycluster on my shared host (Hostator)but was denied access to gcc. I then contacted hosting support and requested assistance. They attempted to install the Pycluster module but was I contacted with this response:

"Hello,

Compiler access is not available on shared accounts. I tried to install this module for you but it showed.

python/clustermodule.c:2577: warning: initialization makes pointer from integer without a cast
python/clustermodule.c:2583: error: syntax error before ')' token
python/clustermodule.c: In function `initcluster':
python/clustermodule.c:2645: warning: implicit declaration of function `import_array'
error: command 'gcc' failed with exit status 1

Are you aware of a fix to this error ?"

I am wondering whether the author of Pyluster is aware of this issue or whether this is a problem with the version of gcc that is on ths Hostgator server.

Is anyone aware of a workaround for this problem?

kyle_mathews’s picture

I'm fairly certain the problem is Python-Numeric isn't installed which Pycluster depends on. If you have ssh access, shell in and type "Python" to get to the interactive shell. Then type "Import Numeric". If that fails, then Numeric isn't installed.

The link for the Python-Numeric installer is here:
http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=13...

Tell me if this solves the problem.

bonobo’s picture

Category: bug » feature
Status: Active » Postponed

Installing PyCluster and Numeric will be problematic on shared hosts for exactly the reasons you describe -- I also suspect that, on shared hosts, the resources required to track memes would exceed what is typically allowed on shared hosts.

Kyle has created an issue about removing the Python dependency -- in my opinion, this goes well beyond the scope of what can and should be managed within the scope of the project.

I'm setting this issue to postponed, as the original issue was about errors with rss feeds, and the python dependency is both addressed in a separate issue and will probably need to remain at least through the SoC project.

With that said, the ease of install will need to be addressed at some point -- but now, it's a lower priority.

bonobo’s picture

Link to http://drupal.org/node/283114 -- Remove Python dependency