Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

jeremymcs
2013-08-14 14:36:55,385 Baruwa[8048]: Got task from broker: preview-message[c8e82f8e-9523-46b0-ba2b-e2ee7db04bda]
2013-08-14 14:36:55,465 Baruwa[8048]: Accessing message: 1V9c7k-0006aF-J8, Failed: coercing to Unicode: need string or buffer, NoneType found
2013-08-14 14:36:55,478 Baruwa[8048]: Task preview-message[c8e82f8e-9523-46b0-ba2b-e2ee7db04bda] succeeded in 0.0913760662079s: {}

[root@mailguard baruwa]# locate 1V9c7k-0006aF-J8
/var/spool/MailScanner/quarantine/20130814/nonspam/1V9c7k-0006aF-J8

Not sure whats going on with this one … 
--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net | Endless Solutions
Office : <a href="tel:850-250-5590;101" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="2">850-250-5590x101 | Cell : <a href="tel:850-890-2543" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="3">850-890-2543 | Fax : <a href="tel:850-254-2955" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="4">850-254-2955


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

Chris Malton
Hi Jeremy,

I just got this as well....
Will try and get a chance to look into it.

Chris

On Wed, 14 Aug 2013 14:39:50 +0000, Jeremy McSpadden wrote:

> 2013-08-14 14:36:55,385 Baruwa[8048]: Got task from broker:
> preview-message[c8e82f8e-9523-46b0-ba2b-e2ee7db04bda]
> 2013-08-14 14:36:55,465 Baruwa[8048]: Accessing message:
> 1V9c7k-0006aF-J8, FAILED: COERCING TO UNICODE: NEED STRING OR BUFFER,
> NONETYPE FOUND
> 2013-08-14 14:36:55,478 Baruwa[8048]: Task
> preview-message[c8e82f8e-9523-46b0-ba2b-e2ee7db04bda] succeeded in
> 0.0913760662079s: {}
>
> [root@mailguard baruwa]# locate 1V9c7k-0006aF-J8
> /var/spool/MailScanner/quarantine/20130814/nonspam/1V9c7k-0006aF-J8
>
> Not sure whats going on with this one …
>
>  --
>  Jeremy McSpadden
>  Flux Labs, Inc | http://www.fluxlabs.net [1] | Endless Solutions
>  Office : 850-250-5590x101 [2] | Cell : 850-890-2543 [3] | Fax :
> 850-254-2955 [4]
>
>
> Links:
> ------
> [1] http://www.fluxlabs.net/
> [2] http://secure.cmtechserv.co.uk/tel:850-250-5590;101
> [3] http://secure.cmtechserv.co.uk/tel:850-890-2543
> [4] http://secure.cmtechserv.co.uk/tel:850-254-2955


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

jeremymcs
Hi Chris

Did you do a manual install? Or use my script ? Trying to determine if it's my code, or a broken package. 

--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net | Endless Solutions
Office : <a href="tel:850-250-5590;101" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="2">850-250-5590x101 | Cell : <a href="tel:850-890-2543" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="3">850-890-2543 | Fax : <a href="tel:850-254-2955" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="4">850-254-2955

On Aug 19, 2013, at 8:23 AM, "Chris Malton" <[hidden email]> wrote:

Hi Jeremy,

I just got this as well....
Will try and get a chance to look into it.

Chris

On Wed, 14 Aug 2013 14:39:50 +0000, Jeremy McSpadden wrote:
2013-08-14 14:36:55,385 Baruwa[8048]: Got task from broker:
preview-message[c8e82f8e-9523-46b0-ba2b-e2ee7db04bda]
2013-08-14 14:36:55,465 Baruwa[8048]: Accessing message:
1V9c7k-0006aF-J8, FAILED: COERCING TO UNICODE: NEED STRING OR BUFFER,
NONETYPE FOUND
2013-08-14 14:36:55,478 Baruwa[8048]: Task
preview-message[c8e82f8e-9523-46b0-ba2b-e2ee7db04bda] succeeded in
0.0913760662079s: {}

[root@mailguard baruwa]# locate 1V9c7k-0006aF-J8
/var/spool/MailScanner/quarantine/20130814/nonspam/1V9c7k-0006aF-J8

Not sure whats going on with this one …

--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net [1] | Endless Solutions
Office : 850-250-5590x101 [2] | Cell : 850-890-2543 [3] | Fax :
850-254-2955 [4]


Links:
------
[1] http://www.fluxlabs.net/
[2] http://secure.cmtechserv.co.uk/tel:850-250-5590;101
[3] http://secure.cmtechserv.co.uk/tel:850-890-2543
[4] http://secure.cmtechserv.co.uk/tel:850-254-2955


_______________________________________________
http://pledgie.com/campaigns/12056

_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

Chris Malton
For me, it was a "manual" install, managed via Puppet.

I therefore suspect something broken outside of your script.

Chris

On Mon, 19 Aug 2013 13:28:02 +0000, Jeremy McSpadden wrote:

> Hi Chris
>
> Did you do a manual install? Or use my script ? Trying to determine
> if
> it's my code, or a broken package.
>
>  --
>  Jeremy McSpadden
>  Flux Labs, Inc | http://www.fluxlabs.net [1] | Endless Solutions
>  Office : 850-250-5590x101 [2] | Cell : 850-890-2543 [3] | Fax :
> 850-254-2955 [4]
>
>  On Aug 19, 2013, at 8:23 AM, "Chris Malton"  wrote:
>
>> Hi Jeremy,
>>
>> I just got this as well....
>> Will try and get a chance to look into it.
>>
>> Chris
>>
>> On Wed, 14 Aug 2013 14:39:50 +0000, Jeremy McSpadden wrote:
>>
>>> 2013-08-14 14:36:55,385 Baruwa[8048]: Got task from broker:
>>
>>> preview-message[c8e82f8e-9523-46b0-ba2b-e2ee7db04bda]
>> 2013-08-14
>>
>>> 8]: Accessing message:
>> 006aF-J8, FAILED: COERCING TO UNICODE: NEE
>>
>>> n>
>>> NONETYPE FOUND
>> quote type="cite">2013-08-14 14:36:55,478 Baruwa[8048]: Task
>>
>>> quote type="cite">preview-m
>> 8e-9523-46b0-ba2b-e2ee7db04bda] succeeded in
>> 760662079s: {}
>> span>
>> pe="cite">[root@mailguard baruwa]# locate 1V9c7k-0006aF-J8
>> quote type="cite">/var/spool/MailScanner/quarantine/20130814/non
>>
>>> pan>
>> an>
>> Not sure whats goin
>> s one …
>> br> --
>> /span>
>>> Flux Labs, Inc |
>> abs.net"> http://www.fluxlabs.net [1] | Endless Solutions
>> pe="cite">Off
>> -5590x101 [2] | Cell : 850-890-2543 [3] | Fax :
>> span>850-254-2955 [4]
>> n>
>> e type="cite">
>> Links:
>>
>>> uote type="cite">
>> n>
>> ="cite">[1]
>> et/">http://ww
>>
>>> n>
>>> [2] ht
>> mtechserv.co.uk/tel:850-250-5590;1
>>
>>> ckquote> [3]
>> -2543"> http://secure.cmtechserv.co.uk/tel:850-890-2543
>> [4] hserv.co.uk/tel:850-254-2955"> htt
>> techserv.co.uk/tel:850-254-2955
>>
>> ___________________
>> ________ ://pledgie.com/camp
>> http://pledgie.com/camp
>>
>>> r>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>
>
> Links:
> ------
> [1] http://www.fluxlabs.net/
> [2] http://secure.cmtechserv.co.uk/tel:850-250-5590;101
> [3] http://secure.cmtechserv.co.uk/tel:850-890-2543
> [4] http://secure.cmtechserv.co.uk/tel:850-254-2955
> [5] mailto:[hidden email]


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

Chris Malton
This gets curiouser and curiouser!

It actually seems to be a quarantine permissions problem that can cause
this.....
(Continues investigating!)

On Mon, 19 Aug 2013 14:57:13 +0100, Chris Malton wrote:

> For me, it was a "manual" install, managed via Puppet.
>
> I therefore suspect something broken outside of your script.
>
> Chris
>
> On Mon, 19 Aug 2013 13:28:02 +0000, Jeremy McSpadden wrote:
>> Hi Chris
>>
>> Did you do a manual install? Or use my script ? Trying to determine
>> if
>> it's my code, or a broken package.
>>
>>  --
>>  Jeremy McSpadden
>>  Flux Labs, Inc | http://www.fluxlabs.net [1] | Endless Solutions
>>  Office : 850-250-5590x101 [2] | Cell : 850-890-2543 [3] | Fax :
>> 850-254-2955 [4]
>>
>>  On Aug 19, 2013, at 8:23 AM, "Chris Malton"  wrote:
>>
>>> Hi Jeremy,
>>>
>>> I just got this as well....
>>> Will try and get a chance to look into it.
>>>
>>> Chris
>>>
>>> On Wed, 14 Aug 2013 14:39:50 +0000, Jeremy McSpadden wrote:
>>>
>>>> 2013-08-14 14:36:55,385 Baruwa[8048]: Got task from broker:
>>>
>>>> preview-message[c8e82f8e-9523-46b0-ba2b-e2ee7db04bda]
>>> 2013-08-14
>>>
>>>> 8]: Accessing message:
>>> 006aF-J8, FAILED: COERCING TO UNICODE: NEE
>>>
>>>> n>
>>>> NONETYPE FOUND
>>> quote type="cite">2013-08-14 14:36:55,478 Baruwa[8048]: Task
>>>
>>>> quote type="cite">preview-m
>>> 8e-9523-46b0-ba2b-e2ee7db04bda] succeeded in
>>> 760662079s: {}
>>> span>
>>> pe="cite">[root@mailguard baruwa]# locate 1V9c7k-0006aF-J8
>>> quote type="cite">/var/spool/MailScanner/quarantine/20130814/non
>>>
>>>> pan>
>>> an>
>>> Not sure whats goin
>>> s one …
>>> br> --
>>> /span>
>>>> Flux Labs, Inc |
>>> abs.net"> http://www.fluxlabs.net [1] | Endless Solutions
>>> pe="cite">Off
>>> -5590x101 [2] | Cell : 850-890-2543 [3] | Fax :
>>> span>850-254-2955 [4]
>>> n>
>>> e type="cite">
>>> Links:
>>>
>>>> uote type="cite">
>>> n>
>>> ="cite">[1]
>>> et/">http://ww
>>>
>>>> n>
>>>> [2] ht
>>> mtechserv.co.uk/tel:850-250-5590;1
>>>
>>>> ckquote> [3]
>>> -2543"> http://secure.cmtechserv.co.uk/tel:850-890-2543
>>> [4] hserv.co.uk/tel:850-254-2955"> htt
>>> techserv.co.uk/tel:850-254-2955
>>>
>>> ___________________
>>> ________ ://pledgie.com/camp
>>> http://pledgie.com/camp
>>>
>>>> r>
>>>
>>>>
>>>
>>>>
>>>
>>>>
>>>
>>>>
>>>
>>>>
>>
>>
>> Links:
>> ------
>> [1] http://www.fluxlabs.net/
>> [2] http://secure.cmtechserv.co.uk/tel:850-250-5590;101
>> [3] http://secure.cmtechserv.co.uk/tel:850-890-2543
>> [4] http://secure.cmtechserv.co.uk/tel:850-254-2955
>> [5] mailto:[hidden email]
>
>
> _______________________________________________
> http://pledgie.com/campaigns/12056


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

Cedric Betrisey


Same Issue for me (coercing to Unicode: need string or buffer, NoneType
found), did you found a solution for it ?


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

jeremymcs
I haven't. I think a package update, possibly celery ... Broke it. Waiting on Andrew to see if he has an idea. 

--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net | Endless Solutions
Office : <a href="tel:850-250-5590;101" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="2">850-250-5590x101 | Cell : <a href="tel:850-890-2543" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="3">850-890-2543 | Fax : <a href="tel:850-254-2955" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="4">850-254-2955

On Aug 26, 2013, at 1:44 PM, "Cedric Betrisey" <[hidden email]> wrote:



Same Issue for me (coercing to Unicode: need string or buffer, NoneType
found), did you found a solution for it ?


_______________________________________________
http://pledgie.com/campaigns/12056


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

angelorc
Up! Any solution?



--
View this message in context: http://baruwa-users-list.963389.n3.nabble.com/Preview-Error-Failed-coercing-to-Unicode-need-string-or-buffer-NoneType-found-tp4026916p4027615.html
Sent from the Baruwa users list mailing list archive at Nabble.com.

_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

angelorc
In reply to this post by jeremymcs
Up! Any solution?
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

angelorc
In reply to this post by jeremymcs
Up! Any solution?
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

jadsy2103
Just wanted to let everyone know here who is struggling,

As it took me a few days of frustration and even i started to build my own PHP page to process previewing etc and in the process of making the PHP site, I ran into permission issue when opening files from my site, with permissions denied error etc.

Following a post regarding PHP and permissions for reading a subfolder/file it seems the issue lies in the fact that the /var & /var/spool & /var/spool/MailScanner folders restrict access, even though correct permissions lie within the files  below, the fix is brilliantly simple, I hope it helps everyone.

BOTTOM LINE, its a simple permissions issue, the NONE type in the error implies it has no string where it should have picked up data,

Allowing each folder on the way to the quarantine folder OPEN access as below solved my issue

chmod ugo+x /var/
chmod ugo+x /var/spool/
chmod ugo+x /var/spool/MailScanner/

Good Luck!

Kind Regards

FYI

I am running Baruwa 2.0.1 w/ Postfix / ClamAv / Spam Assassin,

Everything is working brilliantly - I even re-wrote the postfix configs to do a pgsql lookup for the domains and transports etc, which works - if you need help with those let me know i can post my configs etc.

I also advise that the cronjob in the Community tutorial is slightly incorrect for debian, i had to remove the \ which broke the command into two lines, and have each command on one line only for it to be executed correctly in the /etc/cron.d/ folder.
Reply | Threaded
Open this post in threaded view
|

Re: Preview Error - Failed: coercing to Unicode: need string or buffer, NoneType found

jadsy2103
what ever here is the postfix part of my config just incase you need it  

apt-get install postfix-pgsql (for postfix PostgreSQL support)

/etc/postfix/main.cf (edit and add below lines or replace existing)
relay_domains = pgsql:/etc/postfix/pgsql-relay_domains.cf
transport_maps = pgsql:/etc/postfix/pgsql-transports.cf
whitelist_policy = check_client_access pgsql:/etc/postfix/pgsql-global_lists.cf, check_sender_access pgsql:/etc/postfix/pgsql-global_lists.cf

/etc/postfix/pgsql-global_lists.cf (new file)
user = baruwa
password = verysecretpw
dbname = baruwa query = SELECT CONCAT('PERMIT') FROM lists WHERE from_address='%s' AND list_type=1 UNION SELECT CONCAT('REJECT') FROM lists WHERE from_address='%s' AND list_type=2; hosts = 127.0.0.1

/etc/postfix/pgsql-relay_domains.cf (new file)
user = baruwa
password = verysecretpw
dbname = baruwa
query = SELECT name FROM maildomains WHERE name='%s' AND status='TRUE' AND delivery_mode=1; hosts = 127.0.0.1

/etc/postfix/pgsql-transports.cf (new file)
user = baruwa
password = verysecretpw
dbname = baruwa
query = SELECT CONCAT('smtp:[', destinations.address, ']:', port) FROM destinations, maildomains WHERE maildomains.name = '%s' AND destinations.enabled='TRUE' AND maildomains.id = destinations.domain_id;
hosts = 127.0.0.1