couchapp icon indicating copy to clipboard operation
couchapp copied to clipboard

couchapp generate test - FAILS

Open thanos opened this issue 16 years ago • 1 comments

PROBLEM: C:\stux> couchapp generate test Traceback (most recent call last): File "C:\dev\RAD\Tools\Python25\Scripts\couchapp-script.py", line 8, in load_entry_point('couchapp==0.3.1', 'console_scripts', 'couchapp')() File "c:\dev\rad\tools\python25\lib\site-packages\couchapp-0.3.1-py2.5.egg\couchapp\bin\couchapp_cli.py", line 125, in main cli = CouchappCli(options.verbose) File "c:\dev\rad\tools\python25\lib\site-packages\couchapp-0.3.1-py2.5.egg\couchapp\bin\couchapp_cli.py", line 37, in init self.ui = UI(verbose=verbose, logging_handler=console) File "c:\dev\rad\tools\python25\lib\site-packages\couchapp-0.3.1-py2.5.egg\couchapp\ui.py", line 42, in init self.readconfig(rcpath()) File "c:\dev\rad\tools\python25\lib\site-packages\couchapp-0.3.1-py2.5.egg\couchapp\utils.py", line 76, in rcpath _rcpath = user_rcpath() File "c:\dev\rad\tools\python25\lib\site-packages\couchapp-0.3.1-py2.5.egg\couchapp\utils.py", line 52, in user_rcpath path.append(os.path.join(userprofile, '.couchapprc')) AttributeError: 'str' object has no attribute 'append'

C:\stux>

ENVIRONMENT: C:\stux>python Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

SOLUTION: Here's the patch that works for me:

*** couchapp\utils.py   Wed Jun 10 09:29:17 2009
--- couchapp\utils.py.changed   Wed Jun 10 09:30:26 2009
***************
*** 49,55 ****
              path = os.path.join(home, '.couchapprc')
          userprofile = [os.environ.get('USERPROFILE')]
          if userprofile:
!             path.append(os.path.join(userprofile, '.couchapprc'))
          return path
  else:
      def user_rcpath():
--- 49,55 ----
              path = os.path.join(home, '.couchapprc')
          userprofile = [os.environ.get('USERPROFILE')]
          if userprofile:
!             path = os.path.join(userprofile, '.couchapprc')
          return path
  else:
      def user_rcpath():

thanos avatar Jun 10 '09 13:06 thanos

I there a way for me to upload the patch ? I'm working on a couchdb/python project and I'll try using couchapp. I've been working in python since 1995 so if you need a hand let me know...

Thanos

thanos avatar Jun 10 '09 13:06 thanos