Re: [web2py] Beginner can't get past install

2019-10-20 Thread Nico Zanferrari
Well,

I've made some additional tests. The problem comes just from the
*quarantine *Extended Attribute.

Can you try to remove it following these simple instructions (taken from
here

)?

If the App is downloaded from GitHub and then copied in the desktop as
web2py, open a Terminal and go to your Desktop. Then:

xattr web2py.app-->
shows  com.apple.quarantine as the only Extended Attribute
xattr -d com.apple.quarantine  web2py.app --> deletes the
com.apple.quarantine  Extended Attribute

That's all. At the following run, you only need to press once the OK button
at the request to allow to web2py the access to control "System Events".

Note: if you prefer to use the CMD version, you need to use also the
additional -r option on the parent folder (in order to clean up the
attribute on all the contained files). The command will be something like "
xattr -d -r com.apple.quarantine web2py_py3_cmd"

On my tests with Catalina, it works perfectly.  Please confirm it.


Nico


Il giorno ven 18 ott 2019 alle ore 20:00 Oogie McGuire <
oog...@desertweyr.com> ha scritto:

>
>
> > On Oct 13, 2019, at 10:47 AM, Nico Zanferrari 
> wrote:
> >
> > Hi,
> >
> > this is quite strange
> >
> >   • have you tried both versions (web2py_osx.2_18_5.py2.zip and
> web2py_osx.2_18_5.py3.zip)?
> >   • can you try to open their content (with CTRL on the folder) and
> the run the embedded web2py.app\Contents\MacOS\web2py ?
> >   • can you try to open a terminal and then go to
> web2py.app\Contents\MacOS . Then run web2py there
> >
> > Nico
> >
> Yes tried both versions.
>
> No joy no matter what I do.
>
>
>
> Eugenie (Oogie) McGuire
> Desert Weyr, LLC - Hi Performance Black Welsh Mountain Sheep
> www.DesertWeyr.com
> LambTracker - Open Source Flock Management Software www.LambTracker.com
> Paonia, CO USA
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/7B59845F-17D3-4807-9562-57E9C8AD15AC%40desertweyr.com
> .
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAAE8D_Cz%3Di%2Bcd2kd32oCJiP_uc2UDvfFoiXchd-xSFXOpKQOdw%40mail.gmail.com.


[web2py] Can you change uploadseparate=False to uploadseparate=True

2019-10-20 Thread Nathan Evans
I have searched online and in the forum and found a very clear warning 
about migrating uploadseparate=True to uploadseparate=False. But is it 
possible to enable it after uploads have been created?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/43fa0314-7044-4bc1-91d0-42904c8750a9%40googlegroups.com.


[web2py] Re: Table doesn't exist - in mySQL migrate

2019-10-20 Thread olorunshola matins


Traceback (most recent call last):
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\applications\PCBS\controllers/appadmin.py",
 line 249, in select
nrows = db(query, ignore_common_filters=True).count()
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\packages\dal\pydal\objects.py", 
line 2265, in count
return db._adapter.count(self.query, distinct)
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\packages\dal\pydal\adapters\base.py",
 line 791, in count
self.execute(self._count(query, distinct))
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\packages\dal\pydal\adapters\__init__.py",
 line 67, in wrap
return f(*args, **kwargs)
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\packages\dal\pydal\adapters\base.py",
 line 413, in execute
rv = self.cursor.execute(command, *args[1:], **kwargs)
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\contrib\pymysql\cursors.py", 
line 166, in execute
result = self._query(query)
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\contrib\pymysql\cursors.py", 
line 322, in _query
conn.query(q)
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\contrib\pymysql\connections.py",
 line 835, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\contrib\pymysql\connections.py",
 line 1019, in _read_query_result
result.read()
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\contrib\pymysql\connections.py",
 line 1302, in read
first_packet = self.connection._read_packet()
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\contrib\pymysql\connections.py",
 line 981, in _read_packet
packet.check_error()
  File 
"C:\Users\MATINS\Videos\web2py_src\web2py\gluon\contrib\pymysql\connections.py",
 line 393, in check_error
err.raise_mysql_exception(self._data)
  File "C:\Users\MATINS\Videos\web2py_src\web2py\gluon\contrib\pymysql\err.py", 
line 107, in raise_mysql_exception
raise errorclass(errno, errval)
ProgrammingError: (1146, u"Table 'david_home.auth_group' doesn't exist")

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/4dee3016-82d1-4e34-93f1-a8b12adcf81e%40googlegroups.com.


[web2py] ajax - sqlform

2019-10-20 Thread Dirk C
Hey,

I'm new to web2py.
I want to update a inputfield with the return value of a function.
when adding a new record to t_cre_customers, i want to lookup in table 
t_cre_contractors.
I'm using focusout event to launch.
Passing the argument of field t_cre_customers_f_ctm_no to function 
cre_find_contractor() 
does not work.
And return the result to the sqlform in field t_cre_customers_f_ctm_cr_atv_cd 
neither.
Thanks voor any help.

*db*


# TABLE : t_cre_contractors

db.define_table('t_cre_contractors',
Field('f_ctt_no', type='string',
  label=T('Contractant number'),length=8),
Field('f_ctt_cr_atv_cd', type='string',
  label=T('Credit activity code contractant'),length=8)
)


# TABLE : t_cre_customers

db.define_table('t_cre_customers',
Field('f_ctm_no', type='string',
  label=T('Contractant number borrower'),length=8),
Field('f_ctm_nm', type='string',
  label=T('Name borrower'),length=50),
Field('f_ctm_cr_atv_cd', type='string',
  label=T('Credit activity code borrower'),length=8),
auth.signature,
format='%(f_ctm_nm)s'
)
db.t_cre_customers.f_ctm_no.requires=[IS_NOT_EMPTY()]
db.t_cre_customers.f_ctm_nm.requires=[IS_NOT_EMPTY()]


*controler*
# add customer
def cre_customer_add():
form_add_customer = SQLFORM(db.t_cre_customers)
if form_add_customer.process().accepted:
response.flash = 'You have successfully submitted the form'
elif form_add_customer.errors:
response.flash = 'Please check your form for errors'
else:
response.flash = 'Please fill all fields!'
return dict(form_add_customer=form_add_customer)

#find customer in table t_cre_contractors
def cre_find_contractor():
waarde = request.args(0)
response.flash = waarde
return "test"

*view*
{{extend 'layout.html'}}
Add customer


{{=form_add_customer}}

jQuery(document).ready(function(){
jQuery('#t_cre_customers_f_ctm_cr_atv_cd__row').show();
});
jQuery('#t_cre_customers_f_ctm_no').focusout(function(){
jQuery('#t_cre_customers_f_ctm_cr_atv_cd__row').show();

ajax('{{=URL('default','cre_find_contractor')}}','t_cre_customers_f_ctm_no','t_cre_customers_f_ctm_cr_atv_cd');
});


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/96c9fe15-b423-4b0a-a6f6-c28e59ce477f%40googlegroups.com.


[web2py] Re: problems running PY4WEB

2019-10-20 Thread Massimo Di Pierro
This is the problem:
https://stackoverflow.com/questions/54608421/how-to-fix-notimplementederror-when-trying-to-run-hydrogen-in-atom

Try the latest master. Includes a fix. It will never be as good on Windows 
as on Linux/Mac.

On Friday, 18 October 2019 17:10:15 UTC-7, lu ond wrote:
>
> Dear Massimo,
> I tried to install py4web in windows 10, but a got an NotImplementedError 
> when entered py4web-start apps and the page was not available. The full 
> stack trace was as follows. Did I made some mistake?
>
>
> Microsoft Windows [versão 10.0.18362.418]
> (c) 2019 Microsoft Corporation. Todos os direitos reservados.
> C:\Users\Gatinha>py4web-start apps
> ██╗ ██╗   ██╗██╗  ██╗██╗██╗███╗██╗
> ██╔══██╗╚██╗ ██╔╝██║  ██║██║██║██╔╝██╔══██╗
> ██╔╝ ╚╔╝ ███║██║ █╗ ██║█╗  ██╔╝
> ██╔═══╝   ╚██╔╝  ╚██║██║███╗██║██╔══╝  ██╔══██╗
> ██║██║██║╚███╔███╔╝███╗██╔╝
> ╚═╝╚═╝╚═╝ ╚══╝╚══╝ ╚══╝╚═╝
> Is still experimental...
> Choose a one-time dashboard password:
> Storing the hashed password in file "password.txt"
> [ ] Unzipping app py4web.app._dashboard.zip
> [A[X]
> [ ] Unzipping app py4web.app._default.zip
> [A[X]
> Dashboard is at: http://127.0.0.1:8000/_dashboard
> [ ] loading _dashboard ...
> [A[X] loaded _dashboard
> [ ] loading _default ...
> [A[X] loaded _default
> Bottle v0.12.17 server starting up (using TornadoServer())...
> Listening on http://127.0.0.1:8000/
> Hit Ctrl-C to quit.
> Traceback (most recent call last):
>   File 
> "C:\Users\Gatinha\AppData\Local\Programs\Python\Python38-32\Scripts\py4web-start-script.py",
>  
> line 11, in 
> load_entry_point('py4web==0.1.20190929.1', 'console_scripts', 
> 'py4web-start')()
>   File 
> "C:\Users\Gatinha\AppData\Local\Programs\Python\Python38-32\lib\site-packages\py4web\core.py",
>  
> line 852, in main
> start_server(args)
>   File 
> "C:\Users\Gatinha\AppData\Local\Programs\Python\Python38-32\lib\site-packages\py4web\core.py",
>  
> line 750, in start_server
> bottle.run(server='tornado', host=host, port=int(port), reloader=False)
>   File 
> "C:\Users\Gatinha\AppData\Local\Programs\Python\Python38-32\Scripts\bottle.py",
>  
> line 3131, in run
> server.run(app)
>   File 
> "C:\Users\Gatinha\AppData\Local\Programs\Python\Python38-32\Scripts\bottle.py",
>  
> line 2862, in run
> server.listen(port=self.port,address=self.host)
>   File 
> "C:\Users\Gatinha\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tornado\tcpserver.py",
>  
> line 152, in listen
> self.add_sockets(sockets)
>   File 
> "C:\Users\Gatinha\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tornado\tcpserver.py",
>  
> line 165, in add_sockets
> self._handlers[sock.fileno()] = add_accept_handler(
>   File 
> "C:\Users\Gatinha\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tornado\netutil.py",
>  
> line 279, in add_accept_handler
> io_loop.add_handler(sock, accept_handler, IOLoop.READ)
>   File 
> "C:\Users\Gatinha\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tornado\platform\asyncio.py",
>  
> line 99, in add_handler
> self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
>   File 
> "C:\Users\Gatinha\AppData\Local\Programs\Python\Python38-32\lib\asyncio\events.py",
>  
> line 501, in add_reader
> raise NotImplementedError
> NotImplementedError
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b608bf11-d5c4-4614-93d9-9d4bf4fcc2f6%40googlegroups.com.