I am trying to use Twitter API, I followed directions of http://code.google.com/p/python-twitter/
I installed all the required items, when i test it I get 17 errors.
When i try to import twitter it gives me:
File "C:\Python27\lib\site-packages\twitter.py", line 65, in <module>
import oauth2 as oauth
ImportError: No module named oauth2
I have looked at various questions on this topic, but none of them work for me or maybe because I am doing something wrong. Very lost since it seems i installed all the right files and etc.
Using easy_install bypassed all the problems I experienced with dependencies and installation
Do you have oauth2 installed in your python environment?
http://pypi.python.org/pypi/oauth2/
Perhaps also look into the python-oauth2 package for your OS? (Ubuntu | Debian | Fedora)
Related
I installed Phalcon PHP as described in https://docs.phalcon.io/3.4/en/webserver-wamp.
In this case the URL reads 3.4 because it applies alike for versions 4 and 5.
The WAMP server version is 3.2.6 configured with PHP 8.0.13
Everything was fine so far, so I continued installing the developer tools using composer as described in https://docs.phalcon.io/5.0/en/devtools.
Composer was installed globally and so were the developer tools, but when I type "phalcon" in the command window, the following error is shown:
C:\>phalcon
Fatal error: Uncaught Error: Class "Phalcon\Script" not found in C:\Users\Joachim\AppData\Roaming\Composer\vendor\phalcon\devtools\phalcon.php:38
Stack trace:
#0 {main}
thrown in C:\Users\Joachim\AppData\Roaming\Composer\vendor\phalcon\devtools\phalcon.php on line 38
C:\>
PSR and Phalcon extensions were successfully installed and I can see them in the WAMP Localhost page.
The Path environment variable contains the path to phalcon, composer, wamp, etc, nothing is missing as far as I can see.
Have anyone dealt with this error?
What could be the problem?
I'm a bit late answering this, but in case anyone else stumbles across it via Google the problem is that some namespaces have been altered between Phalcon4 and Phalcon5. I believe Phalcon\Config is one of those classes.
Until the devtools have been updated for Phalcon5, you'll either need to build the scaffolding manually, or copy an old Phalcon 3 or 4 project and update the namespaces.
The perils of using alpha/beta releases, unfortunately.
you didn't mention which phalcon version but since you are using php 8 the only version supporting php 8 is phalcon 5
your issue is most likely in your php.ini for the cli since wamp uses different files for apache and cli.
to fix the issue first remove the devtools package you installed globally then edit the cli php.ini in [wampDir]\bin\php\php8.0.13\php.ini and include psr and phalcon and install the devtools again using composer
you can also download the phar file here and test it in the cli
php phalcon.phar
I have been using a google colab template for iterative LQR that uses the Pydrake, however, it seems like the code repository is removed and I can't reinstall it on google Colab:
try:
import pydrake
import underactuated
except ImportError:
!curl -s https://raw.githubusercontent.com/RussTedrake/underactuated/master/scripts/setup/jupyter_setup.py > jupyter_setup.py
from jupyter_setup import setup_underactuated
setup_underactuated()
# Setup matplotlib backend (to notebook, if possible, or inline).
from underactuated.jupyter import setup_matplotlib_backend
plt_is_interactive = setup_matplotlib_backend()
File "/content/jupyter_setup.py", line 1
404: Not Found
^
SyntaxError: invalid syntax
I tried clicking this link https://raw.githubusercontent.com/RussTedrake/underactuated/master/scripts/setup/jupyter_setup.py, and the page is not found... everything was working fine yesterday
Sorry. You're correct... I updated it this morning, and don't have a good deprecation policy in place on that repo, and this setup script is two versions ago. The path you want is https://raw.githubusercontent.com/RussTedrake/underactuated/master/setup/jupyter_setup.py
(remove the script from the directory). But if you look at that file, you'll see that even that is pointing to an updated setup script which you might want to point to.
This is actually all good news... we are on the path to a much better solution. You can now just pip install drake on colab (see the drake installation guide). Once I land the pip install underactuated (probably in time for my Spring offering of the class), then all of that nasty setup will be gone.
I was trying to configure the hybridauth library so that I can use the the google + and the facebook sign in. But it keeps me giving a fatal error:
Fatal error: require(): Failed opening required 'Facebook\Facebook.php' (include_path='.:/var/www/magilla/lib:/var/www/magilla/models') in /var/www/magilla/lib/RPC/Util.php on line 168
I followed each and every step of their documentation. I have used the
composer to install the library. The library version is 2.9 and the
facebook graph sdk, the most recent version of github
READ EDIT*2 for a proper solution instead
I am encountering the same issue and I suppose you install hybridauth the same way as I did, which is running composer require hybridauth/hybridauth on your project root folder.
I solved this by running composer install within the hybridauth
directory where its composer.json exist, that will install facebook
sdk within the hybridauth directory where the autoload.php is being
load by the script (I personally feel like it is more like a hack than
a proper solution... but I have a feeling that the hybridauth
developer expect you to clone then run the composer install instead of
composer requiring it...I maybe wrong as I just start using composer
as well)
*EDIT check out the issue on their github, there is a bug where the vendor path is being replaced by one in their code, it also mention it is being fixed in later commit. I am new to composer as well so I don't know how to specific the commit for it to update to... if you know how to do it let me know as well
*EDIT*2 alright, I updated to 2.9.3-dev and it seems to solve the issue without generating any new one, I also use that for google and twitter and those are fine too. To update, edit your composer.json to this
"require": {
"hybridauth/hybridauth": "^2.9-dev"
}
then run composer update on your command prompt, things should work as long as you require the composer autoload.php for your script
I am having an issue with a custom filter plugin, and importing a dependency. Can anyone please help me? I get "Trying to load the X filter plugin resulted in this error: no such file to load -- memcache". The code does "require 'memcache". This is available as if I do that in any other script and run it on the CLI, it works, just not when logstash runs it? Does it use some bundled ruby or smth with a different import path? Its 1.4.2 on Debian, if that matters. Driving me insane (Im not a ruby hacker, so im spinning my wheels a bit).
I am following the Neo4django manual: http://neo4django.readthedocs.org/en/latest/auth.html
and trying to setup Admin's interface. I am working under Mac OS X.
Before I started setting up this interface, I had my server running and everything worked. After I made the indicated changes, the server stopped with the error: Error: No module named contenttypes.
If I disable the contettypes line, I get the error Error: No module named admin.
In my settings.py file:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'polls',
'mysite',
'neo4django.admin',
'neo4django.contenttypes',
)
In urls.py:
from django.conf.urls import patterns, include, url
from neo4django import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
)
In admin.py:
from neo4django import admin
from .models import Person
class PersonAdmin(admin.ModelAdmin):
pass
admin.site.register(Person, PersonAdmin)
Could please someone give me correct instructions for setting up the admin's page?
I suggest you throw away the entire tutorial for the moment and install neo4django with pip install -e git+https://github.com/scholrly/neo4django/#egg=neo4django. Also check the github https://github.com/scholrly/neo4django and when installing Django, don't install the latest version but the 1.5.4 version with pip install django==1.5.4
Also, install the 1.9.4 version of neo4j and not the 2.0 version.
If for any reason you find neo4django a bit complicated or not mature enough then you can try the py2neo library (not an ORM) or neomodel (https://github.com/robinedwards/neomodel)